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_ *
const y,
const Index size);
21 static void exec_mkl_impl(
float * r,
const float *
const x,
const float *
const y,
const Index size);
22 static void exec_mkl_impl(
double * r,
const double *
const x,
const double *
const y,
const Index size);
24 template <
typename DT_>
25 static void exec_mkl_impl(DT_ *,
const DT_ *
const,
const DT_ *
const,
const Index)
27 XABORTM(
"LAFEM::Arch::ComponentProductDense::exec_mkl_impl: MKL backend not available!");
30 template <
typename DT_>
31 static void exec_cuda_impl(DT_ * r,
const DT_ *
const x,
const DT_ *
const y,
const Index size);
33 template <
typename DT_>
39 exec_generic_impl(r_view.
get_w(), x_view.
get_r(), y_view.
get_r(), size);
42 template <
typename DT_>
51 template <
typename DT_>
60 template <
typename DT_>
66 exec_generic<DT_>(r, x, y, size);
71 exec_mkl<DT_>(r, x, y, size);
73 XABORTM(
"LAFEM::Arch::ComponentProduct::exec: MKL backend not available!");
79 exec_cuda<DT_>(r, x, y, size);
81 XABORTM(
"LAFEM::Arch::ComponentProduct::exec: CUDA backend not available!");
86 XABORTM(
"LAFEM::Arch::ComponentProduct::exec: unknown backend!");
93 extern template void ComponentProductDense::exec_generic_impl(
float *,
const float *
const,
const float *
const,
const Index);
94 extern template void ComponentProductDense::exec_generic_impl(
double *,
const double *
const,
const double *
const,
const Index);
99#define KERNEL_LAFEM_ARCH_COMPONENT_PRODUCT_DENSE_HPP 1
100#include <kernel/lafem/arch/component_product_dense_generic.hpp>
#define XABORTM(msg)
Abortion macro definition with custom message.
static PreferredBackend get_preferred_backend()
get current preferred backend
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] <- x[i] * y[i]