From 396f5a4a8c551d118a741517bf99c60b198eabfd Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Mon, 24 Feb 2025 19:01:48 +0100 Subject: [PATCH] Workaround --- thrust/thrust/iterator/iterator_traits.h | 8 +++++++- thrust/thrust/iterator/zip_iterator.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/thrust/thrust/iterator/iterator_traits.h b/thrust/thrust/iterator/iterator_traits.h index 2fc25fac938..41e734220cb 100644 --- a/thrust/thrust/iterator/iterator_traits.h +++ b/thrust/thrust/iterator/iterator_traits.h @@ -63,7 +63,13 @@ template using it_reference_t = typename ::cuda::std::iterator_traits::reference; template -using it_difference_t = typename ::cuda::std::iterator_traits::difference_type; +using it_difference_t = typename +// FIXME(bgruber): switching to ::cuda::std::iterator_traits breaks some tests, e.g., +// thrust.test.tabulate_output_iterator +#if _CCCL_COMPILER(NVRTC) + ::cuda +#endif // _CCCL_COMPILER(NVRTC) + ::std::iterator_traits::difference_type; template using it_pointer_t = typename ::cuda::std::iterator_traits::pointer; diff --git a/thrust/thrust/iterator/zip_iterator.h b/thrust/thrust/iterator/zip_iterator.h index 61bbe391fdc..b5dc5fe2db2 100644 --- a/thrust/thrust/iterator/zip_iterator.h +++ b/thrust/thrust/iterator/zip_iterator.h @@ -66,7 +66,7 @@ struct make_zip_iterator_base template struct make_zip_iterator_base<::cuda::std::tuple> { - // reference type is the type of the tuple obtained from the iterators' reference types. + // reference type is the type of the tuple obtained from the iterator's reference types. using reference = tuple_of_iterator_references...>; // Boost's Value type is the same as reference type. using value_type = reference;