E.V.E  0.1-beta

◆ operator[]() [1/3]

template<typename Type , typename Cardinal >
template<typename F >
auto eve::logical< wide< Type, Cardinal > >::operator[] ( as_pattern< F >  p) const
inlinenoexcept

Static lookup via procedural lane indexing.

Generate a new eve::logical which is an arbitrary shuffling of current eve::logical lanes. ‘p’ is an instance of eve::as_pattern instantiated with a constexpr lambda that will be used to generate the pattern algorithmically. Values returned by the lambda must be between 0 and size()-1 or equal to eve::na_ to indicate the value at this lane must be replaced by zero or this operator will not participate in overload resolution.

Note that if the statically generated pattern matches a pre-defined Shuffling and Swizzling function the corresponding optimized shuffling functions will be called.

Parameters
pA eve::as_pattern_t defined from a lambda function
Returns
A logical constructed as logical{ get(p(0,size())), ..., get(p(0,size()-1)) }.
See also
eve::as_pattern