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


[ROCm/hip-tests commit: 6e2e720b26]
이 커밋은 다음에 포함됨:
Alex Voicu가 2017-11-29 21:36:29 +00:00를 커밋했습니다
1 부모 7c2f9f70b4
커밋 1e98955e2a
1 파일이 변경됨
+2 -2
+2 -2
파일 보기
@@ -40,8 +40,8 @@ template <typename T>
__global__ void
vector_square(T *C_d, const T *A_d, size_t N)
{
size_t offset = (blockIdx.x * blockDim.x + threadIdx.x);
size_t stride = blockDim.x * gridDim.x ;
size_t offset = (hipBlockIdx_x * hipBlockDim_x + hipThreadIdx_x);
size_t stride = hipBlockDim_x * hipGridDim_x ;
for (size_t i=offset; i<N; i+=stride) {
C_d[i] = A_d[i] * A_d[i];