Can someone help to fix my compiling issues? Thanks.
code structure:
a.cu:
__global__
void f(){
…
}
b.cuh:
/* I have a a.cuh declaring the f() function. I have a “__global__” before f() declaring. */ include “a.cuh”
template<typename T>
void g(){
…
/* T is not used in f */
f<<<grid, threads>>>();
…
}
As I included a.cuh in b.cuh and these files are compiled by NVCC, the compiling errors are weird for me.
Error hints:
error: expected primary-expression before ‘<’ token error: expected primary-expression before ‘>’ token