10#include <kernel/backend.hpp>
11#include <kernel/util/memory_arbiter.hpp>
13namespace FEAT::LAFEM::Arch
17 template <
typename DT_>
18 static DT_ exec_generic_impl(
const DT_ *
const x,
const Index size);
20 static float exec_mkl_impl(
const float *
const x,
const Index size);
21 static double exec_mkl_impl(
const double *
const x,
const Index size);
23 template <
typename DT_>
24 static DT_ exec_mkl_impl(
const DT_ *
const,
const Index)
26 XABORTM(
"LAFEM::Arch::Norm2Dense::exec_mkl_impl: MKL backend not available!");
29 template <
typename DT_>
30 static DT_ exec_cuda_impl(
const DT_ *
const x,
const Index size);
32 template <
typename DT_>
36 return exec_generic_impl(x_view.
get_r(), size);
39 template <
typename DT_>
43 return exec_mkl_impl(x_view.
get_r(), size);
46 template <
typename DT_>
50 return exec_cuda_impl(x_view.
get_r(), size);
53 template <
typename DT_>
59 return exec_generic<DT_>(x, size);
64 return exec_mkl<DT_>(x, size);
66 XABORTM(
"LAFEM::Arch::Norm2Dense::exec: MKL backend not available!");
72 return exec_cuda<DT_>(x, size);
74 XABORTM(
"LAFEM::Arch::Norm2Dense::exec: CUDA backend not available!");
79 XABORTM(
"LAFEM::Arch::Norm2Dense::exec: unknown backend!");
86 extern template float Norm2Dense::exec_generic_impl(
const float *
const,
const Index);
87 extern template double Norm2Dense::exec_generic_impl(
const double *
const,
const Index);
92#define KERNEL_LAFEM_ARCH_NORM2_DENSE_HPP 1
93#include <kernel/lafem/arch/norm2_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.
std::uint64_t Index
Index data type.