Skip to content

Commit b60b69b

Browse files
authored
Update README.md
So that the init example is actually runnable
1 parent 353d1f6 commit b60b69b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ There is also `GPUArrays.init(device_symbol, filterfuncs...)`, which can be used
7979
initialize a backend.
8080
Filterfuncs can be used to select a device like this (`opencl()`, etc also support those):
8181
```Julia
82-
Pkg.init(:cudanative, is_gpu, dev-> has_atleast(dev, threads, 512))
82+
import GPUArrays: is_gpu, has_atleast, threads
83+
GPUArrays.init(:cudanative, is_gpu, dev -> has_atleast(dev, threads, 512))
8384
```
8485
You can also temporarily create a context on the currently selected backend with this construct:
8586
```Julia

0 commit comments

Comments
 (0)