diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-12-09 20:44:21 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-12-09 20:44:21 +0100 |
commit | 9f02fb542ca659bf58d1efefdb334ea386ef10e8 (patch) | |
tree | 8669e215f38e8b00a4ee73a436479207f2afdbf5 /src/kernels/level1/xswap.opencl | |
parent | ca5dbcd2bd31fb0a0e3f6c2f81b3c0fff6250738 (diff) |
Completed kernel modifications for pre-processor of all other kernels
Diffstat (limited to 'src/kernels/level1/xswap.opencl')
-rw-r--r-- | src/kernels/level1/xswap.opencl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/kernels/level1/xswap.opencl b/src/kernels/level1/xswap.opencl index 267271c0..bf5b6194 100644 --- a/src/kernels/level1/xswap.opencl +++ b/src/kernels/level1/xswap.opencl @@ -28,7 +28,6 @@ void Xswap(const int n, __global real* ygm, const int y_offset, const int y_inc) { // Loops over the work that needs to be done (allows for an arbitrary number of threads) - #pragma unroll for (int id = get_global_id(0); id<n; id += get_global_size(0)) { real temp = xgm[id*x_inc + x_offset]; xgm[id*x_inc + x_offset] = ygm[id*y_inc + y_offset]; @@ -45,8 +44,8 @@ void XswapFast(const int n, __global realV* xgm, __global realV* ygm) { #pragma unroll - for (int w=0; w<WPT; ++w) { - const int id = w*get_global_size(0) + get_global_id(0); + for (int _w = 0; _w < WPT; _w += 1) { + const int id = _w*get_global_size(0) + get_global_id(0); realV temp = xgm[id]; xgm[id] = ygm[id]; ygm[id] = temp; |