Revert "Revert adoption of CUDA indexing in general - this can only work with later versions of the compiler, just like module based dispatch, and thus must be guarded against usage in earlier (e.g. 1.6) versions."

This reverts commit d2fd1f5
Tá an tiomantas seo le fáil i:
Alex Voicu
2017-11-29 21:49:10 +00:00
tuismitheoir 7acb1e6ff6
tiomantas 32e11e7dc6
D'athraigh 63 comhad le 171 breiseanna agus 173 scriosta
+2 -2
Féach ar an gComhad
@@ -57,8 +57,8 @@ vectoradd_float(hipLaunchParm lp,
T* a, const T* bm, int width, int height)
{
int x = hipBlockDim_x * hipBlockIdx_x + hipThreadIdx_x;
int y = hipBlockDim_y * hipBlockIdx_y + hipThreadIdx_y;
int x = blockDim.x * blockIdx.x + threadIdx.x;
int y = blockDim.y * blockIdx.y + threadIdx.y;
int i = y * width + x;
if ( i < (width * height)) {