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_ * r,
const DT_ *
const a,
const IT_ *
const col_idx,
const IT_ *
const row_ptr,
const DT_ *
const x,
const Index rows,
const Index cols,
const Index nonzeros);
20 template <
typename DT_,
typename IT_>
28 exec_generic_impl(r_view.
get_w(), a_view.
get_r(), ci_view.
get_r(), rp_view.
get_r(), x_view.
get_r(), rows, cols, nonzeros);
31 template <
typename DT_,
typename IT_>
32 static void exec_cuda_impl(DT_ * r,
const DT_ *
const a,
const IT_ *
const col_idx,
const IT_ *
const row_ptr,
const DT_ *
const x,
const Index cols,
const Index,
const Index);
34 template <
typename DT_,
typename IT_>
45 template <
typename DT_,
typename IT_>
51 exec_generic<DT_, IT_>(r, a, col_idx, row_ptr, x, rows, cols, nonzeros);
57 exec_generic<DT_, IT_>(r, a, col_idx, row_ptr, x, rows, cols, nonzeros);
59 XABORTM(
"LAFEM::Arch::ScaleRowCSR::exec: MKL backend not available!");
65 exec_cuda<DT_, IT_>(r, a, col_idx, row_ptr, x, rows, cols, nonzeros);
67 XABORTM(
"LAFEM::Arch::ScaleRowCSR::exec: CUDA backend not available!");
72 XABORTM(
"LAFEM::Arch::ScaleRowCSR::exec: unknown backend!");
79 extern template void ScaleColCSR::exec_generic_impl(
float *,
const float *
const,
const std::uint64_t *
const,
const std::uint64_t *
const,
const float *
const,
const Index,
const Index,
const Index);
80 extern template void ScaleColCSR::exec_generic_impl(
double *,
const double *
const,
const std::uint64_t *
const,
const std::uint64_t *
const,
const double *
const,
const Index,
const Index,
const Index);
81 extern template void ScaleColCSR::exec_generic_impl(
float *,
const float *
const,
const std::uint32_t *
const,
const std::uint32_t *
const,
const float *
const,
const Index,
const Index,
const Index);
82 extern template void ScaleColCSR::exec_generic_impl(
double *,
const double *
const,
const std::uint32_t *
const,
const std::uint32_t *
const,
const double *
const,
const Index,
const Index,
const Index);
87#define KERNEL_LAFEM_ARCH_SCALE_COL_CSR_HPP 1
88#include <kernel/lafem/arch/scale_col_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.
@ overlap
explicitly allow overlapping writes (see Overlapping Memory Views)
@ write
write-only access (see attention note above)
std::uint64_t Index
Index data type.