We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8849776 commit 44a811dCopy full SHA for 44a811d
README.md
@@ -190,17 +190,17 @@ __global__ void f() {}
190
```
191
192
Then you can call it by:
193
-```
+```c
194
f <<<blockDim, threadDim>>>();
195
196
The types of both `blockDim` and `threadDim` are `Dim3`. You can define a variable of type `Dim3` by:
197
198
Dim3 var(x, y)
199
200
You only need specify the first two dimension, for the third dimension is always 1.
201
202
For matrix addition:
203
204
__global__ void matrix_add(int **A, int **B, int **C) {
205
int i = blockIdx.x * blockDim.x + threadIdx.x;
206
int j = blockIdx.y * blockDim.y + threadIdx.y;
0 commit comments