Vectorizing a CFD Code With std::simd Supplemented by Transparent Loading and Storing
𝑦4 + 𝑦4 struct Point { double x, y; Point operator+(const Point& other) const; }; void add_pts(Point* x, Point* y, Point* z, int size) { for (int i = 0; i < size; ++i) { z[i] = x[i] + y[i]; } y3 𝑦4 𝑦4 struct Point { double x, y; Point operator+(const Point& other) const; }; void add_pts(Point* x, Point* y, Point* z, int size) { simd_access::loop(0, size, [&](auto i) { SIMD_ACCESS(c 0 码力 | 58 页 | 2.68 MB | 5 月前3
共 1 条
- 1