E.V.E  0.1-beta

◆ operator[]() [2/3]

template<typename Type , typename Cardinal >
template<std::ptrdiff_t... I>
auto eve::logical< wide< Type, Cardinal > >::operator[] ( pattern_t< I... >  p) const
inlinenoexcept

Static lookup via lane indexing.

Generate a new eve::logical which is an arbitrary shuffling of current eve::logical lanes. ‘p’ is an instance of eve::pattern_t constructed via the eve::pattern template variable. Values appearing in the pattern 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 predefined Shuffling and Swizzling function the corresponding optimized shuffling functions will be called.

Parameters
pA eve::pattern defining a shuffling pattern
Returns
A logical constructed as logical{ get(I), ... }.
See also
eve::pattern_t
eve::pattern