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

Change-Id: Ibfc0fd285441cd3d79b312d2b739729a039a6f84
此提交包含在:
ROCm CI Service Account
2022-06-02 17:07:52 +05:30
提交者 GitHub
父節點 7b0ed9e8d3
當前提交 5da168300f
共有 14 個檔案被更改,包括 47 行新增 和 47 行删除
+2 -2
查看文件
@@ -28,11 +28,11 @@ __device__ float myDeviceGlobal;
__device__ float myDeviceGlobalArray[16];
extern "C" __global__ void hello_world(const float* a, float* b) {
int tx = hipThreadIdx_x;
int tx = threadIdx.x;
b[tx] = a[tx];
}
extern "C" __global__ void test_globals(const float* a, float* b) {
int tx = hipThreadIdx_x;
int tx = threadIdx.x;
b[tx] = a[tx] + myDeviceGlobal + myDeviceGlobalArray[tx % ARRAY_SIZE];
}