7#ifndef KERNEL_LAFEM_ARCH_NORM_HPP
8#define KERNEL_LAFEM_ARCH_NORM_HPP 1
12#include <kernel/backend.hpp>
13#include <kernel/util/half.hpp>
23 template <
typename DT_>
24 static DT_
value(
const DT_ *
const x,
const Index size)
26 return value_generic(x, size);
29 template <
typename ValueType_>
30 static ValueType_ value_blocked(
const ValueType_ *
const x,
const Index size)
32 return value_blocked_generic(x, size);
35#ifdef FEAT_HAVE_HALFMATH
38 BACKEND_SKELETON_RETURN(value_cuda, value_generic, value_generic, x, size)
42 static float value(
const float *
const x,
const Index size)
44 BACKEND_SKELETON_RETURN(value_cuda, value_mkl, value_generic, x, size)
47 static double value(
const double *
const x,
const Index size)
49 BACKEND_SKELETON_RETURN(value_cuda, value_mkl, value_generic, x, size)
52 template <
typename DT_>
53 static DT_ value_generic(
const DT_ *
const x,
const Index size);
55 template <
typename ValueType_>
56 static ValueType_ value_blocked_generic(
const ValueType_ *
const x,
const Index size);
58 static float value_mkl(
const float *
const x,
const Index size);
59 static double value_mkl(
const double *
const x,
const Index size);
61 template <
typename DT_>
62 static DT_ value_cuda(
const DT_ *
const x,
const Index size);
66 extern template float Norm2::value_generic(
const float *
const,
const Index);
67 extern template double Norm2::value_generic(
const double *
const,
const Index);
71 template <
typename ValueType_>
72 static ValueType_ value_blocked(
const ValueType_ *
const x,
const Index size)
74 return value_blocked_generic(x, size);
76 template <
typename ValueType_>
77 static ValueType_ value_blocked_generic(
const ValueType_ *
const x,
const Index size);
84#include <kernel/lafem/arch/norm_generic.hpp>
__half Half
Half data type.
@ value
specifies whether the space should supply basis function values
std::uint64_t Index
Index data type.