10#include <kernel/backend.hpp>
11#include <kernel/util/memory_arbiter.hpp>
13namespace FEAT::LAFEM::Arch
18 template <
typename ValueType_>
19 static void exec_generic_impl(ValueType_ * r,
const ValueType_ alpha,
const ValueType_ *
const x,
const Index size);
21 template<
typename ValueType_>
26 exec_generic_impl(r_view.
get_w(), alpha, x_view.
get_r(), size);
29 template<
typename ValueType_>
35 exec_generic<ValueType_>(r, alpha, x, size);
41 exec_generic<ValueType_>(r, alpha, x, size);
43 XABORTM(
"LAFEM::Arch::AxpyBlock::exec: MKL backend not available!");
48 XABORTM(
"LAFEM::Arch::AxpyBlock::exec: CUDA backend not available!");
52 XABORTM(
"LAFEM::Arch::AxpyBlock::exec: unknown backend!");
60#define KERNEL_LAFEM_ARCH_AXPY_BLOCK_HPP 1
61#include <kernel/lafem/arch/axpy_block_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
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.
@ read_write
read-write access
@ overlap
explicitly allow overlapping writes (see Overlapping Memory Views)
std::uint64_t Index
Index data type.
for 0 <= i < n, 0 <= k < blocksize: r[i][k] <- r[i][k] + alpha[k]*x[i][k]