If warp.cpp #includes the source of kernel.cu and contains actual runtime API kernel calls, you will have to rename it warp.cu and compile it with nvcc. The compiler driver relies on the file extension to determine whether parse CUDA code and invoke the device compiler on it. If the extension is .cpp, it will just try and compile as host code.
If warp.cpp #includes the source of kernel.cu and contains actual runtime API kernel calls, you will have to rename it warp.cu and compile it with nvcc. The compiler driver relies on the file extension to determine whether parse CUDA code and invoke the device compiler on it. If the extension is .cpp, it will just try and compile as host code.
Oh i made a mistake in above post… i mistyped the extension my warp.cpp is warp.cu already. its not .cpp its cu.
what i am doing is trying to compile cpp first
then trying to cu files.
then trying to merge them as shown in the link i have provided… compiling individually works but while merging it… it fails with a page or two of errors… all related to cuda.
Oh i made a mistake in above post… i mistyped the extension my warp.cpp is warp.cu already. its not .cpp its cu.
what i am doing is trying to compile cpp first
then trying to cu files.
then trying to merge them as shown in the link i have provided… compiling individually works but while merging it… it fails with a page or two of errors… all related to cuda.
Merging? Do you mean linking? If you do mean linking, can you at least show the linking command you are trying and the first few lines of errors that are produced by it.
Merging? Do you mean linking? If you do mean linking, can you at least show the linking command you are trying and the first few lines of errors that are produced by it.