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 tiomanta 2017-11-29 21:49:10 +00:00
1 tuismitheoir 7acb1e6ff6
tiomantas 32e11e7dc6
63 comhad athraithe
+171 -173

Níor tháinig aon chomhaid le do chuardach

+2 -2
Féach ar an gComhad
@@ -40,8 +40,8 @@ template <typename T>
__global__ void
vector_square(T *C_d, const T *A_d, size_t N)
{
size_t offset = (hipBlockIdx_x * hipBlockDim_x + hipThreadIdx_x);
size_t stride = hipBlockDim_x * hipGridDim_x ;
size_t offset = (blockIdx.x * blockDim.x + threadIdx.x);
size_t stride = blockDim.x * gridDim.x ;
for (size_t i=offset; i<N; i+=stride) {
C_d[i] = A_d[i] * A_d[i];