8#ifndef KERNEL_LAFEM_ARCH_UNIT_FILTER_BLOCK_BCSR_HPP
9#error "Do not include this implementation-only header file directly!"
12#include <kernel/util/math.hpp>
14namespace FEAT::LAFEM::Arch
16 template<
typename DT_,
typename IT_>
17 void UnitFilterBlockBCSR::exec_generic_impl(DT_* mat,
const IT_*
const row_ptr,
const IT_*
const col_idx,
const DT_ *
const f_val,
const IT_ *
const f_idx,
const Index f_nzes,
const bool unit,
const bool ign_nans,
const int block_height,
const int block_width)
19 FEAT_PRAGMA_OMP(parallel
for)
20 for(
Index i = 0; i < f_nzes; ++i)
22 const IT_ ix(f_idx[i]);
23 const DT_*
const vx(&f_val[i*
Index(block_height)]);
26 for(IT_ j(row_ptr[ix]); j < row_ptr[ix + 1]; ++j)
29 for(
int k(0); k < block_height; ++k)
36 for(
int l(0); l < block_width; ++l)
37 mat[j*IT_(block_height*block_width) + IT_(k*block_width) + IT_(l)] = DT_(0);
40 if(unit && (col_idx[j] == ix) && (k < block_width))
41 mat[j*IT_(block_height*block_width) + IT_(k*block_width) + IT_(k)] = DT_(1);
bool isnan(T_ x)
Checks whether a value is Not-A-Number.
std::uint64_t Index
Index data type.