viennacl / viennacl-dev

Developer repository for ViennaCL. Visit http://viennacl.sourceforge.net/ for the latest releases.
Other
281 stars 89 forks source link

error about wrap a viennacl vector with an existing device vector. #290

Open ztdepztdep opened 2 years ago

ztdepztdep commented 2 years ago

when i wrap the vector with an thrust device vector as follows. viennacl::vector vcl_rhs(thrust::raw_pointer_cast(d_b.data()), viennacl::CUDA_MEMORY, vcl_size);

I have include the

ifndef VIENNACL_WITH_CUDA

define VIENNACL_WITH_CUDA

endif

in the head file ,but i still get the errors. What does it means.

terminate called after throwing an instance of 'viennacl::cuda_not_available_exception' what(): ViennaCL was compiled without CUDA support, but CUDA functionality required for this operation. Caught signal 6 - SIGABRT (abort)

karlrupp commented 2 years ago

Please make sure to define VIENNACL_WITH_CUDA before including any ViennaCL header files (i.e. at the very top of the file that contains the code line you've referenced).