8#ifndef KERNEL_LAFEM_ARCH_DIAGONAL_BCSR_HPP
9#error "Do not include this implementation-only header file directly!"
12namespace FEAT::LAFEM::Arch
14 template <
typename DT_,
typename IT_>
15 void DiagonalBCSR::exec_generic_impl(DT_ * diag,
const DT_ *
const val,
const IT_ *
const col_idx,
16 const IT_ *
const row_ptr,
const Index rows,
const int block_size)
20 FEAT_PRAGMA_OMP(parallel
for)
21 for (
Index row = 0; row < rows; row++)
23 Index end = row_ptr[row + 1];
25 for(
Index i(0); i < bs; ++i)
27 diag[bs*row + i] = DT_(0);
30 for (
Index col = row_ptr[row]; col < end; col++)
32 if(col_idx[col] == row)
34 for(
Index i(0); i < bs; ++i)
36 diag[bs*row + i] = val[bs*bs*col + i*bs + i];
std::uint64_t Index
Index data type.