8#ifndef KERNEL_LAFEM_ARCH_ROW_NORM2_CSR_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 RowNorm2CSR::exec_generic_impl(DT_* row_norms,
const DT_*
const a,
const IT_*
const ,
const IT_*
const row_ptr,
const Index rows,
const bool squared)
19 FEAT_PRAGMA_OMP(parallel
for)
20 for (
Index row = 0; row < rows; row++)
22 Index end = row_ptr[row + 1];
25 for (
Index j = row_ptr[row]; j < end; j++)
30 row_norms[row] = (squared ? norm :
Math::sqrt(norm));
T_ sqrt(T_ x)
Returns the square-root of a value.
T_ sqr(T_ x)
Returns the square of a value.
std::uint64_t Index
Index data type.