23namespace vctr::expressions
26template <
size_t extent,
class SrcType>
32 VCTR_COMMON_UNARY_EXPRESSION_MEMBERS (
Square, src)
34 VCTR_FORCEDINLINE
constexpr value_type operator[] (
size_t i)
const
36 const auto s = src[i];
42 VCTR_FORCEDINLINE
const value_type* evalNextVectorOpInExpressionChain (value_type* dst)
const
45 const auto* s = src.evalNextVectorOpInExpressionChain (dst);
46 Expression::Accelerate::mul (s, s, dst, size());
50 VCTR_FORCEDINLINE
const value_type* evalNextVectorOpInExpressionChain (value_type* dst)
const
53 Expression::Accelerate::square (src.evalNextVectorOpInExpressionChain (dst), dst, size());
57 VCTR_FORCEDINLINE
const value_type* evalNextVectorOpInExpressionChain (value_type* dst)
const
60 const auto* s = src.evalNextVectorOpInExpressionChain (dst);
61 Expression::IPP::mul (s, s, dst, size());
70 auto x = src.getAVX (i);
71 return Expression::AVX::mul (x, x);
79 auto x = src.getSSE (i);
80 return Expression::SSE::mul (x, x);
Constrains a type to have a member function getAVX (size_t) const.
Definition: ContainerAndExpressionConcepts.h:78
Constrains a type to have a member function getSSE (size_t) const.
Definition: ContainerAndExpressionConcepts.h:82
A combined concept to check if Apple Accelerate is a suitable option for a complex valued floating po...
Definition: ContainerAndExpressionConcepts.h:246
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 or complex valued floating p...
Definition: ContainerAndExpressionConcepts.h:278
constexpr ExpressionChainBuilder< expressions::Square > square
Squares the source values.
Definition: Square.h:93
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
Definition: AVXRegister.h:28
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
Definition: SSERegister.h:28