I would like to use boost::test as my unit test framework. But when I’m using it within a .cu file, which is processed by nvcc, I get the following errors:
/usr/local/include/boost/smart_ptr/detail/spinlock_sync.hpp(40): error: identifier "__sync_lock_test_and_set" is undefined /usr/local/include/boost/smart_ptr/detail/spinlock_sync.hpp(54): error: identifier "__sync_lock_release" is undefined /usr/local/include/boost/type_traits/is_abstract.hpp(72): error: data member initializer is not allowed
As far as I understood, nvcc will use for the host code a standard c++ compiler. I am using cuda 2.3 and gcc 4.3.2, and these two functions are build-in: gcc Manual. So why do I get these errors? Does anyone else experienced that problem?
This is my call to nvcc:
/usr/local/cuda/bin/nvcc -arch sm_13 --ptxas-options=-v --compiler-options -Wall,-Wextra,-m32 -m32 -O3 --compiler-options -mmmx,-msse,-msse2,-msse3,-mfpmath=sse -I/usr/local/cuda/include -o .objs/redTest.cu.o -c redTest.cu
Thanks in advance.