◆ operator[]() [1/3]
template<typename Type , typename Cardinal >
template<typename F >
Static lookup via procedural lane indexing. Generate a new eve::wide which is an arbitrary shuffling of current eve::wide lanes. ‘p’ is an instance of eve::as_pattern instantiated with a Note that if the statically generated pattern matches a pre-defined Shuffling and Swizzling function the corresponding optimized shuffling functions will be called.
Example: See it live on Compiler Explorer #include <eve/wide.hpp>
#include <iostream>
int main()
{
eve::wide<int, eve::fixed<8>> r{1, 2, 4, 8, 16, 32, 64, 128};
std::cout << r << "\n";
// Reindex r with a constexpr lambda with two parameters
// i : the current index being reordered
// c : the cardinal of the value being reordered
}
|