struct Point { float x, y, z; }; soa<8> Point pts[...]; for (int i = 0; i < 8; ++i) { pts[i].x + pts[i].y }
struct Point { float x[8], y[8], z[8]; }; Point pts; for (int i = 0; i < 8; ++i) { pts.x[i] + pts.y[i]; }
I've not yet had an excuse to use ISPC myself, unfortunately :(
I've not yet had an excuse to use ISPC myself, unfortunately :(