7#ifndef KERNEL_LAFEM_ARCH_NORM_GENERIC_HPP 
    8#define KERNEL_LAFEM_ARCH_NORM_GENERIC_HPP 1 
   10#ifndef KERNEL_LAFEM_ARCH_NORM_HPP 
   11#error "Do not include this implementation-only header file directly!" 
   14#include <kernel/util/math.hpp> 
   23      template <
typename DT_>
 
   24      DT_ Norm2::value_generic(
const DT_ * 
const x, 
const Index size)
 
   27        FEAT_PRAGMA_OMP(parallel 
for reduction(+:r))
 
   28        for (
Index i = 0 ; i < size ; ++i)
 
   36      template <
typename ValueType_>
 
   37      ValueType_ Norm2::value_blocked_generic(
const ValueType_ * 
const x, 
const Index size)
 
   40        FEAT_PRAGMA_OMP(parallel 
for)
 
   41        for(
int j = 0; j<ValueType_::n; ++j)
 
   43          for (
Index i(0) ; i < size ; ++i)
 
   45            r[j] += x[i][j] * x[i][j];
 
   52      template <
typename ValueType_>
 
   53      ValueType_ Norm2Sqr::value_blocked_generic(
const ValueType_ * 
const x, 
const Index size)
 
   56        FEAT_PRAGMA_OMP(parallel 
for)
 
   57        for(
int j = 0; j<ValueType_::n; ++j)
 
   59          for (
Index i(0) ; i < size ; ++i)
 
   61            r[j] += x[i][j] * x[i][j];
 
T_ sqrt(T_ x)
Returns the square-root of a value.
std::uint64_t Index
Index data type.