7#ifndef KERNEL_LAFEM_ARCH_LUMPING_GENERIC_HPP
8#define KERNEL_LAFEM_ARCH_LUMPING_GENERIC_HPP 1
10#ifndef KERNEL_LAFEM_ARCH_LUMPING_HPP
11#error "Do not include this implementation-only header file directly!"
20 template <
typename DT_,
typename IT_>
21 void Lumping::csr_generic(DT_ * lump,
const DT_ *
const val,
const IT_ *
const ,
22 const IT_ *
const row_ptr,
const Index rows)
24 FEAT_PRAGMA_OMP(parallel
for)
25 for (
Index row = 0; row < rows; row++)
27 Index end = row_ptr[row + 1];
29 for (
Index col = row_ptr[row]; col < end; col++)
37 template <
typename DT_,
typename IT_>
38 void Lumping::bcsr_generic(DT_ * lump,
const DT_ *
const val,
const IT_ *
const ,
39 const IT_ *
const row_ptr,
const Index rows,
const int BlockHeight,
const int BlockWidth)
44 FEAT_PRAGMA_OMP(parallel
for)
45 for (
Index row = 0; row < rows; row++)
47 Index end = row_ptr[row + 1];
49 for(
Index i(0); i < block_height; ++i)
51 lump[block_height*row + i] = DT_(0);
54 for (
Index col = row_ptr[row]; col < end; col++)
56 for(
Index i(0); i < block_height; ++i)
58 for(
Index j(0); j < block_width; ++j)
60 lump[block_height*row + i] += val[block_height*block_width*col + i*block_width + j];
std::uint64_t Index
Index data type.