template<typename T, std::size_t N>
struct Vc::array< T, N >
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);
The main vector class for expressing data parallelism.
static Vector IndexesFromZero()
Returns a vector with the entries initialized to 0, 1, 2, 3, 4, 5, ...
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 188 of file types.h.