SWDEV-339113 - Update sampl codes with correct kernel coordinate (#2704)

Change-Id: Ibfc0fd285441cd3d79b312d2b739729a039a6f84
Dieser Commit ist enthalten in:
ROCm CI Service Account
2022-06-02 17:07:52 +05:30
committet von GitHub
Ursprung f6f8a0d144
Commit e6ded45898
14 geänderte Dateien mit 47 neuen und 47 gelöschten Zeilen
@@ -37,8 +37,8 @@ THE SOFTWARE.
// Device (Kernel) function, it must be void
__global__ void matrixTranspose(float* out, float* in, const int width) {
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;
out[y * width + x] = in[x * width + y];
}