10#include <kernel/backend.hpp>
11#include <kernel/util/memory_arbiter.hpp>
13namespace FEAT::LAFEM::Arch
18 template <
typename DT_,
typename IT_>
19 static void exec_generic_impl(DT_ * lump,
const DT_ *
const val,
const IT_ *
const col_idx,
const IT_ *
const row_ptr,
const Index rows);
21 template <
typename DT_,
typename IT_>
22 static void exec_cuda_impl(DT_ * lump,
const DT_ *
const val,
const IT_ *
const col_idx,
const IT_ *
const row_ptr,
const Index rows);
24 template <
typename DT_,
typename IT_>
34 template <
typename DT_,
typename IT_>
44 template <
typename DT_,
typename IT_>
50 exec_generic<DT_, IT_>(lump, val, col_idx, row_ptr, rows);
56 exec_generic<DT_, IT_>(lump, val, col_idx, row_ptr, rows);
58 XABORTM(
"LAFEM::Arch::LumpingCSR::exec: MKL backend not available!");
64 exec_cuda<DT_, IT_>(lump, val, col_idx, row_ptr, rows);
66 XABORTM(
"LAFEM::Arch::LumpingCSR::exec: CUDA backend not available!");
71 XABORTM(
"LAFEM::Arch::LumpingCSR::exec: unknown backend!");
78 extern template void LumpingCSR::exec_generic_impl(
float *,
const float *
const,
const std::uint32_t *
const,
const std::uint32_t *
const,
const Index);
79 extern template void LumpingCSR::exec_generic_impl(
float *,
const float *
const,
const std::uint64_t *
const,
const std::uint64_t *
const,
const Index);
80 extern template void LumpingCSR::exec_generic_impl(
double *,
const double *
const,
const std::uint32_t *
const,
const std::uint32_t *
const,
const Index);
81 extern template void LumpingCSR::exec_generic_impl(
double *,
const double *
const,
const std::uint64_t *
const,
const std::uint64_t *
const,
const Index);
86#define KERNEL_LAFEM_ARCH_LUMPING_CSR_HPP 1
87#include <kernel/lafem/arch/lumping_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.
for 0 <= i < n: lump[i] <- sum_{0 <= j < n} A[i][j]