提交 39b9b499 编写于 作者: F feilong

修正BUG

上级 29a05325
...@@ -10,6 +10,7 @@ kernel<<<gridDim, blockDim>>>(a,b,c) ...@@ -10,6 +10,7 @@ kernel<<<gridDim, blockDim>>>(a,b,c)
``` ```
## 答案 ## 答案
```C++ ```C++
x = threadIdx.x + blockIdx.x * blockDim.x; x = threadIdx.x + blockIdx.x * blockDim.x;
y = threadIdx.y + blockIdx.y * blockDim.y; y = threadIdx.y + blockIdx.y * blockDim.y;
...@@ -18,18 +19,21 @@ y = threadIdx.y + blockIdx.y * blockDim.y; ...@@ -18,18 +19,21 @@ y = threadIdx.y + blockIdx.y * blockDim.y;
## 选项 ## 选项
### A ### A
```C++ ```C++
x = threadIdx.x + blockIdx.x ; x = threadIdx.x + blockIdx.x ;
y = threadIdx.y + blockIdx.y ; y = threadIdx.y + blockIdx.y ;
``` ```
### B ### B
```C++ ```C++
x = threadIdx.x * blockDim.x ; x = threadIdx.x * blockDim.x ;
y = threadIdx.y * blockDim.y ; y = threadIdx.y * blockDim.y ;
``` ```
### C ### C
```C++ ```C++
x = threadIdx.x ; x = threadIdx.x ;
y = threadIdx.y ; y = threadIdx.y ;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册