soa_冲突文件_zkx_20240828215908
Structure of arrays
easier manipulation with packed SIMD instructions in most instruction set architectures
allowing more data to fit onto a single cache line.
struct pointlist3D {
float x[N];
float y[N];
float z[N];
};
struct pointlist3D points;
float get_point_x(int i) { return points.x[i]; }
Array of structures
struct point3D {
float x;
float y;
float z;
};
struct point3D points[N];
float get_point_x(int i) { return points[i].x; }
最后更新于
这有帮助吗?