23namespace vctr::expressions
26template <
size_t extent,
class SrcType>
27requires is::realFloatNumber<ValueType<SrcType>>
35 void applyRuntimeArgs()
40 VCTR_FORCEDINLINE
constexpr value_type operator[] (
size_t i)
const
42 VCTR_ASSERT (srcSum != value_type (0));
43 VCTR_START_IGNORE_WARNING_MSVC (4723)
44 return src[i] / srcSum;
45 VCTR_END_IGNORE_WARNING_MSVC
50 VCTR_FORCEDINLINE
const value_type* evalNextVectorOpInExpressionChain (value_type* dst)
const
53 VCTR_ASSERT (srcSum != value_type (0));
54 Expression::Accelerate::div (src.evalNextVectorOpInExpressionChain (dst), srcSum, dst, size());
58 VCTR_FORCEDINLINE
const value_type* evalNextVectorOpInExpressionChain (value_type* dst)
const
61 VCTR_ASSERT (srcSum != value_type (0));
62 Expression::IPP::div (src.evalNextVectorOpInExpressionChain (dst), srcSum, dst, size());
68 value_type srcSum = value_type (0);
Definition: NormalizeSum.h:29
A combined concept to check if Apple Accelerate is a suitable option for a real valued floating point...
Definition: ContainerAndExpressionConcepts.h:242
A combined concept to check if Intel IPP is a suitable option for a real valued floating point vector...
Definition: ContainerAndExpressionConcepts.h:266
constexpr ExpressionChainBuilder< expressions::NormalizeSum > normalizeSum
Computes the sum of the source elements and divides all source elements by that sum.
Definition: NormalizeSum.h:89
constexpr ExpressionChainBuilder< expressions::Sum > sum
Computes the sum of the source values.
Definition: Sum.h:116
The main namespace of the VCTR project.
Definition: Array.h:24
typename detail::ValueType< std::remove_cvref_t< T > >::Type ValueType
If T is an expression template, it equals its return type, if it's a type that defines value_type as ...
Definition: Traits.h:201
An expression chain builder is an object which supplies various operator<< overloads which build chai...
Definition: ExpressionChainBuilder.h:136
The base class to every expression template.
Definition: ExpressionTemplate.h:37