template<class T, size_t Size>
struct Vc::array< T, Size >
This is std::array
with additional subscript operators supporting gather and scatter operations.
The std::array documentation applies.
Gathers from structured data (AoS: arrays of struct) are possible via a special subscript operator. Example:
std::iota(data.begin(), data.end(), 0.f);
static Vector IndexesFromZero()
Returns a vector with the entries initialized to 0, 1, 2, 3, 4, 5, ...
Vector< float > float_v
vector of single precision
This is std::array with additional subscript operators supporting gather and scatter operations.
This also works for gathers into arrays of structures:
struct Point { float x, y, z; };
float_v xs = data[indexes][&Point::x];
float_v ys = data[indexes][&Point::y];
float_v zs = data[indexes][&Point::z];
Arrays may also be nested:
Definition at line 86 of file array.