Skip to content

Commit 44a811d

Browse files
doc: format cuda
1 parent 8849776 commit 44a811d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,17 @@ __global__ void f() {}
190190
```
191191

192192
Then you can call it by:
193-
```
193+
```c
194194
f <<<blockDim, threadDim>>>();
195195
```
196196
The types of both `blockDim` and `threadDim` are `Dim3`. You can define a variable of type `Dim3` by:
197-
```
197+
```c
198198
Dim3 var(x, y)
199199
```
200200
You only need specify the first two dimension, for the third dimension is always 1.
201201
202202
For matrix addition:
203-
```
203+
```c
204204
__global__ void matrix_add(int **A, int **B, int **C) {
205205
int i = blockIdx.x * blockDim.x + threadIdx.x;
206206
int j = blockIdx.y * blockDim.y + threadIdx.y;

0 commit comments

Comments
 (0)