10#include <kernel/backend.hpp>
11#include <kernel/util/memory_arbiter.hpp>
13namespace FEAT::LAFEM::Arch
17 template <
typename DT_>
20 static void exec_mkl_impl(
float * r,
const float *
const x,
const Index rows_x,
const Index cols_x);
21 static void exec_mkl_impl(
double * r,
const double *
const x,
const Index rows_x,
const Index cols_x);
23 template <
typename DT_>
24 static void exec_mkl_impl(DT_ *,
const DT_ *
const,
const Index,
const Index)
26 XABORTM(
"LAFEM::Arch::TransposeDense::exec_mkl_impl: MKL backend not available!");
29 static void exec_cuda_impl(
float * r,
const float *
const x,
const Index rows_x,
const Index cols_x);
30 static void exec_cuda_impl(
double * r,
const double *
const x,
const Index rows_x,
const Index cols_x);
32 template <
typename DT_>
33 static void exec_cuda_impl(DT_ *,
const DT_ *
const,
const Index,
const Index)
35 XABORTM(
"LAFEM::Arch::TransposeDense::exec_cuda_impl: CUDA backend not available!");
38 template <
typename DT_>
46 template <
typename DT_>
51 exec_mkl_impl(r_view.
get_w(), x_view.
get_r(), rows_x, cols_x);
54 template <
typename DT_>
59 exec_cuda_impl(r_view.
get_w(), x_view.
get_r(), rows_x, cols_x);
62 template <
typename DT_>
70 exec_generic<DT_>(r, x, rows_x, cols_x);
75 exec_mkl<DT_>(r, x, rows_x, cols_x);
77 XABORTM(
"LAFEM::Arch::TransposeDense::exec: MKL backend not available!");
83 exec_cuda<DT_>(r, x, rows_x, cols_x);
85 XABORTM(
"LAFEM::Arch::TransposeDense::exec: CUDA backend not available!");
90 XABORTM(
"LAFEM::Arch::TransposeDense::exec: unknown backend!");
104#define KERNEL_LAFEM_ARCH_TRANSPOSE_DENSE_HPP 1
105#include <kernel/lafem/arch/transpose_dense_generic.hpp>
#define XABORTM(msg)
Abortion macro definition with custom message.
#define XASSERT(expr)
Assertion macro definition.
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.
@ write
write-only access (see attention note above)
std::uint64_t Index
Index data type.
static void exec_generic_impl(DT_ *r, const DT_ *const x, const Index rows_x, const Index cols_x)