Re: [Rd] Use GPU in R with .Call

From: Norm Matloff <matloff_at_cs.ucdavis.edu>
Date: Sun, 22 Jul 2012 16:37:08 -0700


[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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 23 Jul 2012 - 00:02:05 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 23 Jul 2012 - 09:30:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive