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