10#include <kernel/backend.hpp>
11#include <kernel/util/memory_arbiter.hpp>
13namespace FEAT::LAFEM::Arch
17 template <
typename DT_,
typename IT_>
18 static void exec_generic_impl(DT_* row_norms,
const DT_*
const a,
const IT_*
const col_idx,
const IT_*
const row_ptr,
const Index rows,
const bool squared);
20 template <
typename DT_,
typename IT_>
27 exec_generic_impl(r_view.
get_w(), a_view.
get_r(), ci_view.
get_r(), rp_view.
get_r(), rows, squared);
30 template <
typename DT_,
typename IT_>
31 static void exec_cuda_impl(DT_ * row_norms,
const DT_ *
const a,
const IT_ *
const col_idx,
const IT_ *
const row_ptr,
const Index rows,
const bool squared);
33 template <
typename DT_,
typename IT_>
43 template <
typename DT_,
typename IT_>
49 exec_generic<DT_, IT_>(row_norms, a, col_idx, row_ptr, rows, squared);
55 exec_generic<DT_, IT_>(row_norms, a, col_idx, row_ptr, rows, squared);
57 XABORTM(
"LAFEM::Arch::RowNorm2CSR::exec: MKL backend not available!");
63 exec_cuda<DT_, IT_>(row_norms, a, col_idx, row_ptr, rows, squared);
65 XABORTM(
"LAFEM::Arch::RowNorm2CSR::exec: CUDA backend not available!");
70 XABORTM(
"LAFEM::Arch::RowNorm2CSR::exec: unknown backend!");
77 extern template void RowNorm2CSR::exec_generic_impl(
float*,
const float*
const,
const Index*
const,
const Index *
const,
const Index,
const bool);
78 extern template void RowNorm2CSR::exec_generic_impl(
double*,
const double*
const,
const Index*
const,
const Index*
const,
const Index,
const bool);
83#define KERNEL_LAFEM_ARCH_ROW_NORM2_CSR_HPP 1
84#include <kernel/lafem/arch/row_norm2_csr_generic.hpp>
#define XABORTM(msg)
Abortion macro definition with custom message.
static PreferredBackend get_preferred_backend()
get current preferred backend
static void warn_missing(const char *operation, PreferredBackend preferred_backend, PreferredBackend fallback_backend=PreferredBackend::generic)
issues a warning about unsupported backend usage
const T_ * get_r() const
Returns a const typed pointer to the array that grants read access.
T_ * get_w()
Returns a typed pointer to the array that grants write (and read) access.
@ write
write-only access (see attention note above)
std::uint64_t Index
Index data type.