I am working on porting parts of the boost library to compile under cuda / nvcc as device functions. This involves using the thrust library for some things like iterators, arrays, etc. One issue I am finding is a compile error in the thrust library such as:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\include\thrust/iterator/iterator_traits.h(66): error : namespace "boost::std" has no member "ptrdiff_t"
which is triggered by the line in thrust:
typedef std::ptrdiff_t difference_type;
I can fix this by adding the scope operator :: ahead of the std lib call like:
typedef ::std::ptrdiff_t difference_type;
but clearly it is not okay to modify thrust.
Does anyone know why I am getting this issue? i.e. why does the thrust header iterator_traits.h search for std::ptrdiff_t inside the namespace boost::std rather than std? Is there a way to reverse this before I include the thrust header?
It is not easy to provide a minimal working example here due to the nature of porting a large library like boost.
Thanks!