10#include <kernel/backend.hpp>
11#include <kernel/util/memory_arbiter.hpp>
13namespace FEAT::LAFEM::Arch
18 template<
typename DT_>
19 static void exec_generic_impl(DT_* r,
const DT_*
const x,
const DT_ alpha,
const Index size);
21 template<
typename DT_>
22 static void exec_cuda_impl(DT_* r,
const DT_*
const x,
const DT_ alpha,
const Index size);
24 template <
typename DT_>
29 exec_generic_impl(r_view.
get_w(), x_view.
get_r(), alpha, size);
32 template <
typename DT_>
37 exec_cuda_impl(r_view.
get_w(), x_view.
get_r(), alpha, size);
40 template <
typename DT_>
46 exec_generic<DT_>(r, x, alpha, size);
52 exec_generic<DT_>(r, x, alpha, size);
54 XABORTM(
"LAFEM::Arch::ComponentInvertDense::exec: MKL backend not available!");
60 exec_cuda<DT_>(r, x, alpha, size);
62 XABORTM(
"LAFEM::Arch::ComponentInvertDense::exec: CUDA backend not available!");
67 XABORTM(
"LAFEM::Arch::ComponentInvertDense::exec: unknown backend!");
74 extern template void ComponentInvertDense::exec_generic_impl(
float*,
const float*
const,
const float,
const Index);
75 extern template void ComponentInvertDense::exec_generic_impl(
double*,
const double*
const,
const double,
const Index);
80#define KERNEL_LAFEM_ARCH_COMPONENT_INVERT_DENSE_HPP 1
81#include <kernel/lafem/arch/component_invert_dense_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.
for 0 <= i < n: r[i] <- alpha / x[i]