Skip to content
Back to formatted view

Raw Message

Message-ID: <20120722214132.GA16923@laura>
Date: 2012-07-22T21:41:32Z
From: Norm Matloff
Subject: Use GPU in R with .Call

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