10#include <kernel/backend.hpp>
11#include <kernel/util/memory_arbiter.hpp>
13namespace FEAT::LAFEM::Arch
17 template<
typename DT_,
typename IT_>
18 static void exec_generic_impl(
const Index bs,
const Index boff,
const Index nidx,
const IT_* idx, DT_* buf,
const DT_* vec);
20 template<
typename DT_,
typename IT_>
21 static void exec_cuda_impl(
const Index bs,
const Index boff,
const Index nidx,
const IT_* idx, DT_* buf,
const DT_* vec);
23 template<
typename DT_,
typename IT_,
int block_size_>
29 return exec_generic_impl(
Index(block_size_), boff, nidx, i_view.
get_r(), b_view.
get_w(), x_view.
get_r());
32 template<
typename DT_,
typename IT_,
int block_size_>
38 return exec_cuda_impl(
Index(block_size_), boff, nidx, i_view.
get_r(), b_view.
get_w(), x_view.
get_r());
41 template<
typename DT_,
typename IT_,
int block_size_>
47 exec_generic<DT_, IT_, block_size_>(boff, nidx, idx, buf, vec);
53 exec_generic<DT_, IT_, block_size_>(boff, nidx, idx, buf, vec);
55 XABORTM(
"LAFEM::Arch::MirrorBlockGather::exec: MKL backend not available!");
61 exec_cuda<DT_, IT_, block_size_>(boff, nidx, idx, buf, vec);
63 XABORTM(
"LAFEM::Arch::MirrorBlockGather::exec: CUDA backend not available!");
68 XABORTM(
"LAFEM::Arch::MirrorBlockGather::exec: unknown backend!");
76#define KERNEL_LAFEM_ARCH_MIRROR_BLOCK_GATHER_HPP 1
77#include <kernel/lafem/arch/mirror_block_gather_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
View view(Location mem_loc, Access access)
Maps a raw view to a memory block.
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.