hi all
i am new in forum environment and in opencl.
i am very confuse with the get_global_id() like functions
if i have a code on cuda to get the 3d array
int nBlocksX = nGridPointsX/BLOCK_SIZE;
int nBlocksY = nGridPointsY/BLOCK_SIZE;
int nBlocksZ = nGridPointsZ/BLOCK_SIZE;
dim3 dimGrid(nBlocksX * nBlocksY * nBlocksZ);
dim3 dimBlock(BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE);
int I = blockIdx.x;
int bx = I%nBlocksX;
int by = (I/nBlocksX)%nBlocksY;
int bz = I/(nBlocksX*nBlocksY);
int tx = threadIdx.x + bx * BLOCK_SIZE;
int ty = threadIdx.y + by * BLOCK_SIZE;
int tz = threadIdx.z + bz * BLOCK_SIZE;
v[tx + tynGridPointsX + tznGridPointsX*nGridPointsY]
how can i convert this code in opencl?
thanks in advance