8#ifndef KERNEL_LAFEM_ARCH_MATVECMULT_CSR_BLOCK_HPP
9#error "Do not include this implementation-only header file directly!"
12namespace FEAT::LAFEM::Arch
14 template <
typename DT_,
typename IT_,
int block_size_>
15 void MatVecMultCSRBlock::exec_generic_impl(Tiny::Vector<DT_,block_size_> * r,
const DT_ alpha,
const Tiny::Vector<DT_,block_size_> *
const x,
const Tiny::Vector<DT_,block_size_> *
const y,
const DT_ *
const val,
16 const IT_ *
const col_idx,
const IT_ *
const row_ptr,
const Index rows,
const Index ,
const Index ,
const bool transposed)
18 XASSERTM(!transposed,
"transposed mat-vec-mult not implemented yet");
20 FEAT_PRAGMA_OMP(parallel
for schedule(
static, 2000))
21 for (
Index row = 0 ; row < rows ; ++row)
23 Tiny::Vector<DT_, block_size_> bsum(0);
24 const IT_ end(row_ptr[row + 1]);
25 for (IT_ i(row_ptr[row]) ; i < end ; ++i)
27 bsum.axpy(val[i], x[col_idx[i]]);
33 r[row].axpy(alpha, bsum);
#define XASSERTM(expr, msg)
Assertion macro definition with custom message.
std::uint64_t Index
Index data type.