23namespace vctr::expressions
26template <
size_t extent,
class SrcType>
32 VCTR_COMMON_UNARY_EXPRESSION_MEMBERS (
Cube, src)
34 VCTR_FORCEDINLINE
constexpr value_type operator[] (
size_t i)
const
36 const auto s = src[i];
45 auto x = src.getAVX (i);
46 auto y = Expression::AVX::mul (x, x);
47 return Expression::AVX::mul (x, y);
55 auto x = src.getSSE (i);
56 auto y = Expression::SSE::mul (x, x);
57 return Expression::SSE::mul (x, y);
63 requires archARM &&
has::getNeon<SrcType> && (Expression::CommonElement::isRealFloat || Expression::CommonElement::isInt32 || Expression::CommonElement::isUint32)
65 auto x = src.getNeon (i);
66 auto y = Expression::Neon::mul (x, x);
67 return Expression::Neon::mul (x, y);
Constrains a type to have a member function getAVX (size_t) const.
Definition: ContainerAndExpressionConcepts.h:78
Constrains a type to have a member function getNeon (size_t) const.
Definition: ContainerAndExpressionConcepts.h:74
Constrains a type to have a member function getSSE (size_t) const.
Definition: ContainerAndExpressionConcepts.h:82
constexpr ExpressionChainBuilder< expressions::Cube > cube
Raises the source values to the power of three.
Definition: Cube.h:80
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: NeonRegister.h:28
Definition: SSERegister.h:28