calling C functions from a Cuda file

I know there is a way we can call Cuda functions from C file. Is there a way i can call C functions from Cuda file.


If you declare the C function with device, then you can call it from a global function. You can also use the same function on both CPU and GPU if you declare it host device. Note that the C function is restricted to whatever you can do on a CUDA device (no malloc()/free(), etc) and device functions can only call other device functions.