Handbook
Glossary
cuda-hello-world ( -- )
Vocabulary
cuda
.
demos
.
hello-world
Inputs
None
Outputs
None
Definition
USING:
cuda
cuda.contexts
cuda.devices
cuda.libraries
cuda.memory
destructors
io
io.encodings.string
io.encodings.utf8
kernel
math
math.parser
sequences
strings
;
IN:
cuda.demos.hello-world
:
cuda-hello-world
( -- )
init-cuda
[
[
context-device
number>string
"CUDA device "
": "
surround
write
"Hello World!"
utf8
encode
[
-
]
B{
}
map-index-as
host>device
&cuda-free
[
{
2 1
}
{
6 1 1
}
<grid>
helloWorld
]
[
12
device>host
>string
print
]
bi
]
with-destructors
]
with-each-cuda-device
;