Skip to content
Prev 46254 / 63458 Next

question about Makeconf and nvcc/CUDA

Hi Erin

It appears that there is only one file in src that is compile, i.e. cuda4.cu.

That does not contain a routine named cuda4, which is what you are trying to invoke
via the .Call("cuda4") expression.

Instead, it contains two routines - one kernel square_array which runs
on the GPU, and the routine stuff.

To be able to call the stuff() routine from R, you would have to
a)  add
      extern "C"
    before its definition/declaration so that its name is not mangled by nvcc

b)  change its signature so that it can be invoked via a .Call() or alternatively
    a .C().

 I would create another routine that acts as an intermediate routine
called from R that then calls stuff().

This assumes that what you showed us of cuda4.cu is all there is in it.
   D.
On 7/18/13 11:01 AM, Hodgess, Erin wrote: