3/10/2015

error : calling a __host__ function("cuComplex::cuComplex") from a __device__ function("julia") is not allowed

If you meet this error studying juliaset in CUDA by example book capture 4.

calling a __host__ function("cuComplex::cuComplex") from a __device__ function("julia") is not allowed

modify like this in cuComplex structure
cuComplex( float a, float b ) : r(a), i(b)  {}  -->  __device__ cuComplex( float a, float b ) : r(a), i(b)  {}


Hope to see julia set, beautiful~


2 comments: