Я пытаюсь обновить этот проект (https://github.com/ashwin/gStar4D), который написан на CUDA 4.0 до 8.0. Но я получаю тонну ошибки компиляции Thrust на линии, как это:Устранение ошибок с CUDA 4.0 до 8.0
thrust::sort_by_key( orderVec.begin(), orderVec.end(),
thrust::make_zip_iterator(make_tuple(_pointVec->begin(), _scaledVec->begin())));
Ошибки, как правило, «ошибка: класс„тяги :: tuple_size <>“не имеет ни одного члена„значение“», «ошибка: неполный тип не допускается»или„ошибка: имя, сопровождаемое „::“ должен быть классом или пространства имен имя“
1>E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/tuple.h(90): error : name followed by "::" must be a class or namespace name
1> detected during:
1> instantiation of class "thrust::tuple_size<T> [with T=<error-type>]"
1> (90): here
1> instantiation of class "thrust::tuple_size<T> [with T=std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>]"
1> E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/detail/tuple_meta_transform.h(29): here
1> processing of template argument list for "thrust::detail::tuple_meta_transform" based on template arguments <std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>, thrust::iterator_reference>
1> E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/iterator/detail/zip_iterator_base.h(329): here
1> instantiation of class "thrust::detail::zip_iterator_base_ns::tuple_of_iterator_references<IteratorTuple> [with IteratorTuple=std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>]"
1> E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/iterator/detail/zip_iterator_base.h(365): here
1> instantiation of class "thrust::detail::zip_iterator_base<IteratorTuple> [with IteratorTuple=std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>]"
1> E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/iterator/zip_iterator.h(141): here
1> instantiation of class "thrust::zip_iterator<IteratorTuple> [with IteratorTuple=std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>]"
1> E:/testcode/gStar4D-master/GDelaunay/GDelaunay/GDelData.cu(119): here
1>
1> 1>
1>E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/tuple.h(90): error : class "thrust::tuple_size<<error-type>>" has no member "value"
1> detected during:
1> instantiation of class "thrust::tuple_size<T> [with T=<error-type>]"
1> (90): here
1> instantiation of class "thrust::tuple_size<T> [with T=std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>]"
1> E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/detail/tuple_meta_transform.h(29): here
1> processing of template argument list for "thrust::detail::tuple_meta_transform" based on template arguments <std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>, thrust::iterator_reference>
1> E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/iterator/detail/zip_iterator_base.h(329): here
1> instantiation of class "thrust::detail::zip_iterator_base_ns::tuple_of_iterator_references<IteratorTuple> [with IteratorTuple=std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>]"
1> E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/iterator/detail/zip_iterator_base.h(365): here
1> instantiation of class "thrust::detail::zip_iterator_base<IteratorTuple> [with IteratorTuple=std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>]"
1> E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/iterator/zip_iterator.h(141): here
1> instantiation of class "thrust::zip_iterator<IteratorTuple> [with IteratorTuple=std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>]"
1> E:/testcode/gStar4D-master/GDelaunay/GDelaunay/GDelData.cu(119): here
1>
1> 1>
1>E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/iterator/detail/zip_iterator_base.h(326): error : incomplete type is not allowed
1> detected during:
1> instantiation of class "thrust::detail::zip_iterator_base_ns::tuple_of_iterator_references<IteratorTuple> [with IteratorTuple=std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>]"
1> (365): here
1> instantiation of class "thrust::detail::zip_iterator_base<IteratorTuple> [with IteratorTuple=std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>]"
1> E:\programs\Nvidia GPU Computing Toolkit\CUDA\v8.0\include\thrust/iterator/zip_iterator.h(141): here
1> instantiation of class "thrust::zip_iterator<IteratorTuple> [with IteratorTuple=std::tuple<thrust::detail::normal_iterator<thrust::device_ptr<Point3>>, thrust::detail::normal_iterator<thrust::device_ptr<Point3>>>]"
1> E:/testcode/gStar4D-master/GDelaunay/GDelaunay/GDelData.cu(119): here
1>
Любые мысли о том, что может быть проблема?
Когда я компилирую 'GDelData.cu' сам по linux на CUDA 8, я получаю некоторые предупреждения, но без ошибок. Что произойдет, если вы измените 'make_tuple' в строке 119 на' thrust :: make_tuple'? –
Это сделало трюк. Благодаря! – griffin2000
@ griffin2000: не могли бы вы добавить ответ, описывающий ваше решение? – talonmies