Description Usage Arguments Details Value Author(s) See Also Examples
The function g
transfers the object to the GPU.
The function h
transfers it back to the host.
1 2 |
x |
The object to be transfered. |
type |
The type to convert the object to. There are three different ways to specify this. One may use the |
dup |
This may be set to 'FALSE' to avoid duplicating x in the event that it is on the GPU allready and the original type is the same as the type argument. |
These functions may be more convenient than functions such as 'as.gmatrix' or 'as.gvector'. In addition to having a very short name, one does not need to consider whether the object is a vector or matrix.
The 'h' function transfers device data back to the host and returns a matrix or vector, while the 'g' function
returns an object of class gmatrix
or gvector
storing the data on the GPU.
Nathan Morris
as.gmatrix
and as.numeric
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.