7#ifndef KERNEL_LAFEM_ARCH_UNIT_FILTER_GENERIC_HPP 
    8#define KERNEL_LAFEM_ARCH_UNIT_FILTER_GENERIC_HPP 1 
   10#ifndef KERNEL_LAFEM_ARCH_UNIT_FILTER_HPP 
   11#error "Do not include this implementation-only header file directly!" 
   21      template <
typename DT_, 
typename IT_>
 
   22      void UnitFilter::filter_rhs_generic(DT_ * v, 
const DT_ * 
const sv_elements, 
const IT_ * 
const sv_indices, 
const Index ue)
 
   24        FEAT_PRAGMA_OMP(parallel 
for)
 
   25        for(
Index i = 0; i < ue ; ++i)
 
   27          v[sv_indices[i]] = sv_elements[i];
 
   31      template <
typename DT_, 
typename IT_>
 
   32      void UnitFilter::filter_def_generic(DT_ * v, 
const IT_ * 
const sv_indices, 
const Index ue)
 
   34        FEAT_PRAGMA_OMP(parallel 
for)
 
   35        for(
Index i = 0; i < ue ; ++i)
 
   37          v[sv_indices[i]] = DT_(0);
 
   41      template<
typename DT_, 
typename IT_>
 
   42      void UnitFilter::filter_unit_mat_generic(DT_* mat, 
const IT_* 
const row_ptr, 
const IT_* 
const col_idx, 
const IT_ * 
const sv_indices, 
const Index ue)
 
   44        FEAT_PRAGMA_OMP(parallel 
for)
 
   45        for(
Index i = 0; i < ue; ++i)
 
   47          const IT_ ix(sv_indices[i]);
 
   50          for(IT_ j(row_ptr[ix]); j < row_ptr[ix + 1]; ++j)
 
   52            mat[j] = (col_idx[j] == ix) ? DT_(1) : DT_(0);
 
   57      template<
typename DT_, 
typename IT_>
 
   58      void UnitFilter::filter_offdiag_row_mat_generic(DT_* mat, 
const IT_* 
const row_ptr, 
int block_width, 
const IT_ * 
const sv_indices, 
const Index ue)
 
   60        FEAT_PRAGMA_OMP(parallel 
for)
 
   61        for(
Index i = 0; i < ue; ++i)
 
   63          const IT_ ix(sv_indices[i]);
 
   66          for(IT_ j(row_ptr[ix]); j < row_ptr[ix + 1]; ++j)
 
   68            for(
int l(0); l < block_width; ++l)
 
   69              mat[j*block_width + l] = DT_(0);
 
   74      template<
typename DT_, 
typename IT_>
 
   75      void UnitFilter::filter_weak_matrix_rows_generic(DT_* mat_a, 
const DT_ * 
const mat_m, 
const IT_* 
const row_ptr,
 
   76                                                              const DT_ * 
const sv_elements, 
const IT_ * 
const sv_indices, 
const Index ue)
 
   78        FEAT_PRAGMA_OMP(parallel 
for)
 
   79        for(
Index i = 0; i < ue; ++i)
 
   81          const IT_ ix(sv_indices[i]);
 
   84          for(IT_ j(row_ptr[ix]); j < row_ptr[ix + 1]; ++j)
 
   86            mat_a[j] = sv_elements[i] * mat_m[j];
 
std::uint64_t Index
Index data type.