From matloff at cs.ucdavis.edu  Mon Jul 23 01:37:08 2012
From: matloff at cs.ucdavis.edu (Norm Matloff)
Date: Sun, 22 Jul 2012 16:37:08 -0700
Subject: [Rd] Use GPU in R with .Call
Message-ID: <20120722233708.GA17426@laura>

[Sorry, originally sent to wrong list.]

I'm not exactly sure what you are asking, Raymond, but this may answer
your question.

Say you have a file x.cu.  After compiling with nvcc -c as you did, then
do something like this:

setenv PKG_LIBS "-L/usr/local/cuda/lib -lcudart"
R CMD SHLIB x.o -o x.so

PKG_LIBS is an environment variable used by R CMD SHLIB.

Of course, you need to translate the setting of the environment variable
from Linux C shell to Windows, and substitute your location of the CUDA
library.

Norm



[Rd] Use GPU in R with .Call
Norm Matloff