#ifndef TATAMI_APPLY_CONFIG_HPP #define TATAMI_APPLY_CONFIG_HPP #include namespace tatami { namespace stats { template struct has_sparse_direct { static constexpr bool value = false; }; template struct has_sparse_direct().sparse_direct(), 0)> { static constexpr bool value = true; }; /******************/ template struct has_sparse_running { static constexpr bool value = false; }; template struct has_sparse_running().sparse_running(), 0)> { static constexpr bool value = true; }; /******************/ template struct has_sparse_running_parallel { static constexpr bool value = false; }; template struct has_sparse_running_parallel().sparse_running(0, 0), 0)> { static constexpr bool value = true; }; /******************/ template struct has_dense_running { static constexpr bool value = false; }; template struct has_dense_running().dense_running(), 0)> { static constexpr bool value = true; }; /******************/ template struct has_dense_running_parallel { static constexpr bool value = false; }; template struct has_dense_running_parallel().dense_running(0, 0), 0)> { static constexpr bool value = true; }; /******************/ template struct has_nonconst_dense_compute { static constexpr bool value = false; }; template struct has_nonconst_dense_compute().compute_copy(0, std::declval()), 0)> { // note the const-ness. static constexpr bool value = true; }; /******************/ template struct has_nonconst_sparse_compute { static constexpr bool value = false; }; template struct has_nonconst_sparse_compute().compute_copy(0, 0, std::declval(), std::declval()), 0)> { static constexpr bool value = true; }; /******************/ template struct nonconst_sparse_compute_copy_mode { static constexpr SparseCopyMode value = SPARSE_COPY_BOTH; }; template struct nonconst_sparse_compute_copy_mode { static constexpr SparseCopyMode value = V::copy_mode; }; } } #endif