Following the sample code in CUDA samples about C++ integration I was writing the wrapper functions that call CUDA code in a .cu
file.
In that file I have a function that initializes CUDA context and allocates global memory and puts some data in constant memory.
extern "C" void initEngine(int *d_data, int *d_coefA, int *d_coefB)
{
//Allocations
//Copy to constant memory
}
Now what I want to do is overload that initEngine
function to receive to more parameters but I think there's no way to overload that function as it has C linkage am I right?
extern "C" void initEngine(int *d_data, int *d_coefA, int *d_coefB, int *d_coefC,
int *d_random)
{
//Allocations
//Copy to constant memory
}
Could you give me some advise to have only one initEngine
function? or is not possible and I have to have 2 functions or probably have only one function with all the parameters and just pass NULL references or something like that.