Skip to content

Commit f2cf374

Browse files
committed
Update README.
1 parent 30f3f8f commit f2cf374

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,23 @@ ct.scatter(arr, indices, tile; mask=active_mask)
250250
All atomics accept `memory_order` (default: `ct.MemoryOrder.AcqRel`) and
251251
`memory_scope` (default: `ct.MemScope.Device`) keyword arguments.
252252

253+
### Debugging
254+
| Operation | Description |
255+
|-----------|-------------|
256+
| `print(args...)` | Print values (Base overlay) |
257+
| `println(args...)` | Print values with newline (Base overlay) |
258+
259+
Standard Julia `print`/`println` work inside kernels. String constants and tiles
260+
can be mixed freely; format specifiers are inferred from element types at compile
261+
time. String interpolation is supported.
262+
263+
```julia
264+
println("Block ", ct.bid(1), ": tile=", tile)
265+
println("result=$result") # string interpolation
266+
```
267+
268+
This is a debugging aid and is not optimized for performance.
269+
253270

254271
## Differences from cuTile Python
255272

0 commit comments

Comments
 (0)