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,
const int block_height,
const int block_width);
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,
const int block_height,
const int block_width);
24 template <
typename DT_,
typename IT_>
31 exec_generic_impl(l_view.
get_w(), a_view.
get_r(), ci_view.
get_r(), rp_view.
get_r(), rows, block_height, block_width);
34 template <
typename DT_,
typename IT_>
41 exec_cuda_impl(l_view.
get_w(), a_view.
get_r(), ci_view.
get_r(), rp_view.
get_r(), rows, block_height, block_width);
44 template <
typename DT_,
typename IT_>
50 exec_generic<DT_, IT_>(lump, val, col_idx, row_ptr, rows, block_height, block_width);
56 exec_generic<DT_, IT_>(lump, val, col_idx, row_ptr, rows, block_height, block_width);
58 XABORTM(
"LAFEM::Arch::LumpingBCSR::exec: MKL backend not available!");
64 exec_cuda<DT_, IT_>(lump, val, col_idx, row_ptr, rows, block_height, block_width);
66 XABORTM(
"LAFEM::Arch::LumpingBCSR::exec: CUDA backend not available!");
71 XABORTM(
"LAFEM::Arch::LumpingBCSR::exec: unknown backend!");
78 extern template void LumpingBCSR::exec_generic_impl(
float *,
const float *
const,
const Index *
const,
const Index *
const,
const Index,
const int,
const int);
79 extern template void LumpingBCSR::exec_generic_impl(
double *,
const double *
const,
const Index *
const,
const Index *
const,
const Index,
const int,
const int);
84#define KERNEL_LAFEM_ARCH_LUMPING_BCSR_HPP 1
85#include <kernel/lafem/arch/lumping_bcsr_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, 0 <= k < blocksize: (lump[i])[k] <- sum_{0 <= j < n, 0 < l < blocksize} (A[i][j])[k][...