... | ... | @@ -31,13 +31,13 @@ It is generally placed before a loop which is offloaded to the GPU. |
|
|
|
|
|
| Directive | Description |
|
|
|
|:---------:|:------------|
|
|
|
| map([\<var\>]) | Maps a variable from host and back after the kernel finishes. |
|
|
|
| map(from:[\<var\>]) | Maps a variable from host, it's initial value is undefined. |
|
|
|
| map(to:[\<var\>]) | Maps a variable to device, but not back. |
|
|
|
| map(fromto:[\<var\>]) | Maps a variable from host and back after the kernel finishes. |
|
|
|
| map([\<var\>]) | Map a variable to device and back after the kernel finishes. |
|
|
|
| map(from:[\<var\>]) | Map a variable from device back, it's initial value is undefined. |
|
|
|
| map(to:[\<var\>]) | Map a variable to device, but not back. |
|
|
|
| map(tofrom:[\<var\>]) | Map a variable to device and back after the kernel finishes. |
|
|
|
| map(alloc:[\<var\>] | Allocate space for the variable on device, but do not copy anything. |
|
|
|
|
|
|
Note that the `from`, `to`, `fromto`, and `alloc` options are called the *specifiers*.
|
|
|
Note that the `from`, `to`, `tofrom`, and `alloc` options are called the *specifiers*.
|
|
|
|
|
|
### Allocative memory operations
|
|
|
There are also directives that you can use to allocate memory on the device and is accessible by the kernel.
|
... | ... | |