Recently,I have found a slam program which is coded in VS2013. I found its *.cpp files include many *.h headers which include many function which have host in front of functions. I know if a function has
host or device must be compiled by NVCC. *.cpp file are not include this function. So I am confused. Could someone know why?
here is the detailed description:
in VoxelUtilHashSDF.h
struct HashDataStruct {
///////////////
// Host part //
///////////////
__device__ __host__
HashDataStruct() {
.......
}
…
}
and in DepthSensing.cpp
include “VoxelUtilHashSDF.h” are writted
generally speaking, .cpp can not include this .h file because it has _device host.
I try this condition in linux. I was failed, but in VS2013 can. Why?