Description Usage Arguments Value Author(s) See Also
This is (currently) a simple function that takes an
R vector/matrix and returns a pointer to the elements
so that they can be used to copy the contents
to a CUDA device.
We specify the desired type of the individual elements.
If this a float
, we create a new array at the
native level and arrange to free that when it is no longer referenced.
For an integer or numeric vector, this returns the pointer to the
actual elements in the R object.
1 | convertToPtr(value, type)
|
value |
the R vector |
type |
the name of the type of element we want |
An external pointer object.
Duncan Temple Lang
mallocPitch
and the assignment method
for PitchMemory2
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.