8#ifndef KERNEL_LAFEM_ARCH_MATVECMULT_CSR_DENSE_HPP
9#error "Do not include this implementation-only header file directly!"
12namespace FEAT::LAFEM::Arch
14 template <
typename DT_,
typename IT_>
15 void MatVecMultCSRDense::exec_generic_impl(DT_ * r,
const DT_ alpha,
const DT_ *
const x,
const DT_ *
const y,
const DT_ *
const val,
16 const IT_ *
const col_idx,
const IT_ *
const row_ptr,
const Index rows,
const Index cols,
const Index,
const bool transposed)
22 FEAT_PRAGMA_OMP(parallel
for)
23 for (
Index col = 0 ; col < cols ; ++col)
28 else if((r != y) || (alpha != DT_(1)))
30 const DT_ ba = DT_(1) / alpha;
31 FEAT_PRAGMA_OMP(parallel
for)
32 for (
Index col = 0 ; col < cols ; ++col)
38 for (
Index row(0) ; row < rows ; ++row)
40 for (
Index i(row_ptr[row]) ; i < row_ptr[row+1] ; ++i)
42 r[col_idx[i]] += val[i] * x[row];
48 FEAT_PRAGMA_OMP(parallel
for)
49 for (
Index col = 0 ; col < cols ; ++col)
51 r[col] = alpha * r[col];
59 FEAT_PRAGMA_OMP(parallel
for schedule(
static, 2000))
60 for (
Index row = 0 ; row < rows ; ++row)
63 const IT_ end(row_ptr[row + 1]);
64 for (IT_ i = row_ptr[row] ; i < end ; ++i)
66 sum += val[i] * x[col_idx[i]];
73 FEAT_PRAGMA_OMP(parallel
for schedule(
static, 2000))
74 for (
Index row = 0 ; row < rows ; ++row)
77 const IT_ end(row_ptr[row + 1]);
78 for (IT_ i = row_ptr[row] ; i < end ; ++i)
80 sum += val[i] * x[col_idx[i]];
82 r[row] = y[row] + (sum * alpha);
std::uint64_t Index
Index data type.