Description Arguments Details Examples
Read a kernel from source file, compile it, and load it on device.
fn |
Name (including path) of kernel source file (typically .cu) which
defines a |
Note: the name of the entry function for your kernel MUST be 'kernexec', since that is what will eventually be called when the kernel is launched. More flexible names may be supported in the future.
If the kernel fails to compile, an error will be thrown but the output will
not be terribly helpful for debugging. In this event, try compiling the
kernel file on the command line with nvcc yourkernel.cu
. This will
always produce an error about missing main
entry point, but any other
errors will need to be fixed.
Simple example kernels are in the "extdata" folder of this package (for a
listing try dir(system.file("extdata", package="cudalite"))
)
1 2 3 4 5 6 | ## Not run:
cu <- new(Cuda)
k <- system.file("extdata", "hello.cu", package="cudalite")
cu$loadKernel(k)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.