In order to call the same function from host code and GPU kernel, Do I have to keep the two copies of the same function as below:
int sum(int a, int b){
return a+b;
}
__device int sumGPU(int a, int b){
return a+b;
}
Or is there any technique to keep/manage a single copy of the function?