@@ -163,26 +163,29 @@ using CudaGridRange = GpuGridRange<T...>;
163163// Usage: for(int i : GpuGridRangeX(count)) { visit(i); }
164164template <typename T>
165165__device__ detail::GpuGridRange<T> GpuGridRangeX (T count) {
166- return detail::GpuGridRange<T>(blockIdx.x * blockDim.x + threadIdx.x ,
167- gridDim.x * blockDim.x , count);
166+ return detail::GpuGridRange<T>(
167+ /* begin=*/ blockIdx.x * blockDim.x + threadIdx.x ,
168+ /* delta=*/ gridDim.x * blockDim.x , /* end=*/ count);
168169}
169170CREATE_CUDA_DEVICE_FUNCTION_ALIAS (GpuGridRangeX, CudaGridRangeX);
170171
171172// Helper to visit indices in the range 0 <= i < count using the y-coordinate.
172173// Usage: for(int i : GpuGridRangeY(count)) { visit(i); }
173174template <typename T>
174175__device__ detail::GpuGridRange<T> GpuGridRangeY (T count) {
175- return detail::GpuGridRange<T>(blockIdx.y * blockDim.y + threadIdx.y ,
176- gridDim.y * blockDim.y , count);
176+ return detail::GpuGridRange<T>(
177+ /* begin=*/ blockIdx.y * blockDim.y + threadIdx.y ,
178+ /* delta=*/ gridDim.y * blockDim.y , /* end=*/ count);
177179}
178180CREATE_CUDA_DEVICE_FUNCTION_ALIAS (GpuGridRangeY, CudaGridRangeY);
179181
180182// Helper to visit indices in the range 0 <= i < count using the z-coordinate.
181183// Usage: for(int i : GpuGridRangeZ(count)) { visit(i); }
182184template <typename T>
183185__device__ detail::GpuGridRange<T> GpuGridRangeZ (T count) {
184- return detail::GpuGridRange<T>(blockIdx.z * blockDim.z + threadIdx.z ,
185- gridDim.z * blockDim.z , count);
186+ return detail::GpuGridRange<T>(
187+ /* begin=*/ blockIdx.z * blockDim.z + threadIdx.z ,
188+ /* delta=*/ gridDim.z * blockDim.z , /* end=*/ count);
186189}
187190CREATE_CUDA_DEVICE_FUNCTION_ALIAS (GpuGridRangeZ, CudaGridRangeZ);
188191
0 commit comments