Hello! I’ve tried to organize my CUDA code splitting it in multiple .cu and .cuh files. Basically I have a group of device functions that I want to reuse them by calling in other device functions or global functions in separate .cu files; so I’ve decided to put these functions in a separate file. The problems that occurs are the following:
either I’m getting “error LNK2005” because the functions had been already defined (are used in two different .cu files)
or when I’m trying to use a header .cuh, in order to solve the first issue, I’m getting the “error : external calls not supported (found non-inlined call…”. Something bizarre happens here because the device functions are inlined by default.
The second approach seems to be the right one but how should I fix this problem?
Thanks in advance!