cuda-cccl 0.3.1__cp313-cp313-manylinux_2_24_aarch64.whl → 0.3.2__cp313-cp313-manylinux_2_24_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cuda-cccl might be problematic. Click here for more details.

Files changed (185) hide show
  1. cuda/cccl/headers/include/cub/agent/agent_histogram.cuh +354 -572
  2. cuda/cccl/headers/include/cub/block/block_adjacent_difference.cuh +6 -8
  3. cuda/cccl/headers/include/cub/block/block_discontinuity.cuh +24 -14
  4. cuda/cccl/headers/include/cub/block/block_exchange.cuh +5 -0
  5. cuda/cccl/headers/include/cub/block/block_histogram.cuh +4 -0
  6. cuda/cccl/headers/include/cub/block/block_load.cuh +4 -0
  7. cuda/cccl/headers/include/cub/block/block_radix_rank.cuh +1 -0
  8. cuda/cccl/headers/include/cub/block/block_reduce.cuh +1 -0
  9. cuda/cccl/headers/include/cub/block/block_scan.cuh +12 -2
  10. cuda/cccl/headers/include/cub/block/block_store.cuh +3 -2
  11. cuda/cccl/headers/include/cub/detail/mdspan_utils.cuh +34 -30
  12. cuda/cccl/headers/include/cub/detail/ptx-json-parser.h +1 -1
  13. cuda/cccl/headers/include/cub/device/device_for.cuh +118 -40
  14. cuda/cccl/headers/include/cub/device/device_reduce.cuh +6 -7
  15. cuda/cccl/headers/include/cub/device/device_segmented_reduce.cuh +12 -13
  16. cuda/cccl/headers/include/cub/device/device_transform.cuh +122 -91
  17. cuda/cccl/headers/include/cub/device/dispatch/dispatch_merge.cuh +2 -3
  18. cuda/cccl/headers/include/cub/device/dispatch/dispatch_reduce.cuh +4 -3
  19. cuda/cccl/headers/include/cub/device/dispatch/dispatch_reduce_deterministic.cuh +1 -1
  20. cuda/cccl/headers/include/cub/device/dispatch/dispatch_streaming_reduce.cuh +4 -5
  21. cuda/cccl/headers/include/cub/device/dispatch/dispatch_streaming_reduce_by_key.cuh +0 -1
  22. cuda/cccl/headers/include/cub/device/dispatch/dispatch_topk.cuh +3 -5
  23. cuda/cccl/headers/include/cub/device/dispatch/dispatch_transform.cuh +13 -5
  24. cuda/cccl/headers/include/cub/device/dispatch/kernels/for_each.cuh +72 -37
  25. cuda/cccl/headers/include/cub/device/dispatch/kernels/transform.cuh +22 -27
  26. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_transform.cuh +61 -70
  27. cuda/cccl/headers/include/cub/thread/thread_reduce.cuh +24 -17
  28. cuda/cccl/headers/include/cub/warp/warp_load.cuh +6 -6
  29. cuda/cccl/headers/include/cub/warp/warp_reduce.cuh +7 -2
  30. cuda/cccl/headers/include/cub/warp/warp_scan.cuh +7 -3
  31. cuda/cccl/headers/include/cub/warp/warp_store.cuh +1 -0
  32. cuda/cccl/headers/include/cuda/__barrier/barrier_block_scope.h +19 -0
  33. cuda/cccl/headers/include/cuda/__cccl_config +1 -0
  34. cuda/cccl/headers/include/cuda/__cmath/fast_modulo_division.h +3 -74
  35. cuda/cccl/headers/include/cuda/__cmath/mul_hi.h +146 -0
  36. cuda/cccl/headers/include/cuda/__complex/get_real_imag.h +0 -4
  37. cuda/cccl/headers/include/cuda/__device/arch_id.h +176 -0
  38. cuda/cccl/headers/include/cuda/__device/arch_traits.h +239 -317
  39. cuda/cccl/headers/include/cuda/__device/attributes.h +4 -3
  40. cuda/cccl/headers/include/cuda/__device/compute_capability.h +171 -0
  41. cuda/cccl/headers/include/cuda/__device/device_ref.h +0 -10
  42. cuda/cccl/headers/include/cuda/__device/physical_device.h +1 -26
  43. cuda/cccl/headers/include/cuda/__event/event.h +26 -26
  44. cuda/cccl/headers/include/cuda/__event/event_ref.h +5 -5
  45. cuda/cccl/headers/include/cuda/__event/timed_event.h +9 -7
  46. cuda/cccl/headers/include/cuda/__fwd/devices.h +4 -4
  47. cuda/cccl/headers/include/cuda/__iterator/constant_iterator.h +46 -31
  48. cuda/cccl/headers/include/cuda/__iterator/strided_iterator.h +79 -47
  49. cuda/cccl/headers/include/cuda/__iterator/tabulate_output_iterator.h +59 -36
  50. cuda/cccl/headers/include/cuda/__iterator/transform_input_output_iterator.h +79 -49
  51. cuda/cccl/headers/include/cuda/__iterator/transform_iterator.h +74 -48
  52. cuda/cccl/headers/include/cuda/__iterator/transform_output_iterator.h +80 -55
  53. cuda/cccl/headers/include/cuda/__iterator/zip_common.h +2 -12
  54. cuda/cccl/headers/include/cuda/__iterator/zip_iterator.h +15 -19
  55. cuda/cccl/headers/include/cuda/__iterator/zip_transform_iterator.h +59 -60
  56. cuda/cccl/headers/include/cuda/__mdspan/host_device_accessor.h +127 -60
  57. cuda/cccl/headers/include/cuda/__mdspan/host_device_mdspan.h +178 -3
  58. cuda/cccl/headers/include/cuda/__mdspan/restrict_accessor.h +38 -8
  59. cuda/cccl/headers/include/cuda/__mdspan/restrict_mdspan.h +67 -1
  60. cuda/cccl/headers/include/cuda/__memory/ptr_in_range.h +93 -0
  61. cuda/cccl/headers/include/cuda/__memory_resource/get_memory_resource.h +4 -4
  62. cuda/cccl/headers/include/cuda/__memory_resource/properties.h +44 -0
  63. cuda/cccl/headers/include/cuda/__memory_resource/resource.h +1 -1
  64. cuda/cccl/headers/include/cuda/__memory_resource/resource_ref.h +4 -6
  65. cuda/cccl/headers/include/cuda/__nvtx/nvtx3.h +2 -1
  66. cuda/cccl/headers/include/cuda/__runtime/ensure_current_context.h +5 -4
  67. cuda/cccl/headers/include/cuda/__stream/stream.h +8 -8
  68. cuda/cccl/headers/include/cuda/__stream/stream_ref.h +17 -16
  69. cuda/cccl/headers/include/cuda/__utility/in_range.h +65 -0
  70. cuda/cccl/headers/include/cuda/cmath +1 -0
  71. cuda/cccl/headers/include/cuda/devices +3 -0
  72. cuda/cccl/headers/include/cuda/memory +1 -0
  73. cuda/cccl/headers/include/cuda/std/__algorithm/equal_range.h +2 -2
  74. cuda/cccl/headers/include/cuda/std/__algorithm/find.h +1 -1
  75. cuda/cccl/headers/include/cuda/std/__algorithm/includes.h +2 -4
  76. cuda/cccl/headers/include/cuda/std/__algorithm/lower_bound.h +1 -1
  77. cuda/cccl/headers/include/cuda/std/__algorithm/make_projected.h +7 -15
  78. cuda/cccl/headers/include/cuda/std/__algorithm/min_element.h +1 -1
  79. cuda/cccl/headers/include/cuda/std/__algorithm/minmax_element.h +1 -2
  80. cuda/cccl/headers/include/cuda/std/__algorithm/partial_sort_copy.h +2 -2
  81. cuda/cccl/headers/include/cuda/std/__algorithm/upper_bound.h +1 -1
  82. cuda/cccl/headers/include/cuda/std/__cccl/algorithm_wrapper.h +36 -0
  83. cuda/cccl/headers/include/cuda/std/__cccl/builtin.h +46 -49
  84. cuda/cccl/headers/include/cuda/std/__cccl/execution_space.h +6 -0
  85. cuda/cccl/headers/include/cuda/std/__cccl/host_std_lib.h +52 -0
  86. cuda/cccl/headers/include/cuda/std/__cccl/memory_wrapper.h +36 -0
  87. cuda/cccl/headers/include/cuda/std/__cccl/numeric_wrapper.h +36 -0
  88. cuda/cccl/headers/include/cuda/std/__cmath/isnan.h +3 -2
  89. cuda/cccl/headers/include/cuda/std/__complex/complex.h +3 -2
  90. cuda/cccl/headers/include/cuda/std/__complex/literals.h +14 -34
  91. cuda/cccl/headers/include/cuda/std/__complex/nvbf16.h +2 -1
  92. cuda/cccl/headers/include/cuda/std/__complex/nvfp16.h +4 -3
  93. cuda/cccl/headers/include/cuda/std/__concepts/invocable.h +2 -2
  94. cuda/cccl/headers/include/cuda/std/__cstdlib/malloc.h +3 -2
  95. cuda/cccl/headers/include/cuda/std/__functional/bind.h +10 -13
  96. cuda/cccl/headers/include/cuda/std/__functional/function.h +5 -8
  97. cuda/cccl/headers/include/cuda/std/__functional/invoke.h +71 -335
  98. cuda/cccl/headers/include/cuda/std/__functional/mem_fn.h +1 -2
  99. cuda/cccl/headers/include/cuda/std/__functional/reference_wrapper.h +3 -3
  100. cuda/cccl/headers/include/cuda/std/__functional/weak_result_type.h +0 -6
  101. cuda/cccl/headers/include/cuda/std/__fwd/allocator.h +13 -0
  102. cuda/cccl/headers/include/cuda/std/__fwd/char_traits.h +13 -0
  103. cuda/cccl/headers/include/cuda/std/__fwd/complex.h +13 -4
  104. cuda/cccl/headers/include/cuda/std/__fwd/mdspan.h +23 -0
  105. cuda/cccl/headers/include/cuda/std/__fwd/pair.h +13 -0
  106. cuda/cccl/headers/include/cuda/std/__fwd/string.h +22 -0
  107. cuda/cccl/headers/include/cuda/std/__fwd/string_view.h +14 -0
  108. cuda/cccl/headers/include/cuda/std/__internal/features.h +0 -5
  109. cuda/cccl/headers/include/cuda/std/__internal/namespaces.h +21 -0
  110. cuda/cccl/headers/include/cuda/std/__iterator/iterator_traits.h +5 -5
  111. cuda/cccl/headers/include/cuda/std/__mdspan/extents.h +7 -1
  112. cuda/cccl/headers/include/cuda/std/__mdspan/mdspan.h +53 -39
  113. cuda/cccl/headers/include/cuda/std/__memory/allocator.h +3 -3
  114. cuda/cccl/headers/include/cuda/std/__memory/construct_at.h +1 -3
  115. cuda/cccl/headers/include/cuda/std/__optional/optional_base.h +1 -0
  116. cuda/cccl/headers/include/cuda/std/__ranges/compressed_movable_box.h +892 -0
  117. cuda/cccl/headers/include/cuda/std/__ranges/movable_box.h +2 -2
  118. cuda/cccl/headers/include/cuda/std/__type_traits/is_primary_template.h +7 -5
  119. cuda/cccl/headers/include/cuda/std/__type_traits/result_of.h +1 -1
  120. cuda/cccl/headers/include/cuda/std/__utility/pair.h +0 -5
  121. cuda/cccl/headers/include/cuda/std/bitset +1 -1
  122. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/__config +15 -12
  123. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/variant +11 -9
  124. cuda/cccl/headers/include/cuda/std/inplace_vector +4 -4
  125. cuda/cccl/headers/include/cuda/std/numbers +5 -0
  126. cuda/cccl/headers/include/cuda/std/string_view +146 -11
  127. cuda/cccl/headers/include/cuda/stream_ref +5 -0
  128. cuda/cccl/headers/include/cuda/utility +1 -0
  129. cuda/cccl/headers/include/nv/target +7 -2
  130. cuda/cccl/headers/include/thrust/allocate_unique.h +1 -1
  131. cuda/cccl/headers/include/thrust/detail/allocator/allocator_traits.h +309 -33
  132. cuda/cccl/headers/include/thrust/detail/allocator/copy_construct_range.h +151 -4
  133. cuda/cccl/headers/include/thrust/detail/allocator/destroy_range.h +60 -3
  134. cuda/cccl/headers/include/thrust/detail/allocator/fill_construct_range.h +45 -3
  135. cuda/cccl/headers/include/thrust/detail/allocator/malloc_allocator.h +31 -6
  136. cuda/cccl/headers/include/thrust/detail/allocator/tagged_allocator.h +29 -16
  137. cuda/cccl/headers/include/thrust/detail/allocator/temporary_allocator.h +41 -4
  138. cuda/cccl/headers/include/thrust/detail/allocator/value_initialize_range.h +42 -4
  139. cuda/cccl/headers/include/thrust/detail/complex/ccosh.h +3 -3
  140. cuda/cccl/headers/include/thrust/detail/internal_functional.h +1 -1
  141. cuda/cccl/headers/include/thrust/detail/memory_algorithms.h +1 -1
  142. cuda/cccl/headers/include/thrust/detail/temporary_array.h +1 -1
  143. cuda/cccl/headers/include/thrust/detail/type_traits.h +1 -1
  144. cuda/cccl/headers/include/thrust/device_delete.h +18 -3
  145. cuda/cccl/headers/include/thrust/device_free.h +16 -3
  146. cuda/cccl/headers/include/thrust/device_new.h +29 -8
  147. cuda/cccl/headers/include/thrust/host_vector.h +1 -1
  148. cuda/cccl/headers/include/thrust/iterator/tabulate_output_iterator.h +5 -2
  149. cuda/cccl/headers/include/thrust/mr/disjoint_pool.h +1 -1
  150. cuda/cccl/headers/include/thrust/mr/pool.h +1 -1
  151. cuda/cccl/headers/include/thrust/system/cuda/detail/find.h +13 -115
  152. cuda/cccl/headers/include/thrust/system/cuda/detail/mismatch.h +8 -2
  153. cuda/cccl/headers/include/thrust/type_traits/is_contiguous_iterator.h +7 -7
  154. cuda/compute/__init__.py +2 -0
  155. cuda/compute/_bindings.pyi +43 -1
  156. cuda/compute/_bindings_impl.pyx +156 -7
  157. cuda/compute/algorithms/_scan.py +108 -36
  158. cuda/compute/algorithms/_transform.py +32 -11
  159. cuda/compute/cu12/_bindings_impl.cpython-313-aarch64-linux-gnu.so +0 -0
  160. cuda/compute/cu12/cccl/libcccl.c.parallel.so +0 -0
  161. cuda/compute/cu13/_bindings_impl.cpython-313-aarch64-linux-gnu.so +0 -0
  162. cuda/compute/cu13/cccl/libcccl.c.parallel.so +0 -0
  163. cuda/compute/iterators/__init__.py +2 -0
  164. cuda/compute/iterators/_factories.py +28 -0
  165. cuda/compute/iterators/_iterators.py +206 -1
  166. cuda/compute/numba_utils.py +2 -2
  167. cuda/compute/typing.py +2 -0
  168. {cuda_cccl-0.3.1.dist-info → cuda_cccl-0.3.2.dist-info}/METADATA +1 -1
  169. {cuda_cccl-0.3.1.dist-info → cuda_cccl-0.3.2.dist-info}/RECORD +171 -175
  170. cuda/cccl/headers/include/thrust/detail/algorithm_wrapper.h +0 -37
  171. cuda/cccl/headers/include/thrust/detail/allocator/allocator_traits.inl +0 -371
  172. cuda/cccl/headers/include/thrust/detail/allocator/copy_construct_range.inl +0 -242
  173. cuda/cccl/headers/include/thrust/detail/allocator/destroy_range.inl +0 -137
  174. cuda/cccl/headers/include/thrust/detail/allocator/fill_construct_range.inl +0 -99
  175. cuda/cccl/headers/include/thrust/detail/allocator/malloc_allocator.inl +0 -68
  176. cuda/cccl/headers/include/thrust/detail/allocator/tagged_allocator.inl +0 -86
  177. cuda/cccl/headers/include/thrust/detail/allocator/temporary_allocator.inl +0 -79
  178. cuda/cccl/headers/include/thrust/detail/allocator/value_initialize_range.inl +0 -98
  179. cuda/cccl/headers/include/thrust/detail/device_delete.inl +0 -52
  180. cuda/cccl/headers/include/thrust/detail/device_free.inl +0 -47
  181. cuda/cccl/headers/include/thrust/detail/device_new.inl +0 -61
  182. cuda/cccl/headers/include/thrust/detail/memory_wrapper.h +0 -40
  183. cuda/cccl/headers/include/thrust/detail/numeric_wrapper.h +0 -37
  184. {cuda_cccl-0.3.1.dist-info → cuda_cccl-0.3.2.dist-info}/WHEEL +0 -0
  185. {cuda_cccl-0.3.1.dist-info → cuda_cccl-0.3.2.dist-info}/licenses/LICENSE +0 -0
@@ -24,12 +24,14 @@
24
24
  #include <cuda/std/__functional/invoke.h>
25
25
  #include <cuda/std/__iterator/concepts.h>
26
26
  #include <cuda/std/__iterator/iterator_traits.h>
27
+ #include <cuda/std/__ranges/compressed_movable_box.h>
27
28
  #include <cuda/std/__ranges/movable_box.h>
28
29
  #include <cuda/std/__type_traits/conditional.h>
29
30
  #include <cuda/std/__type_traits/is_nothrow_copy_constructible.h>
30
31
  #include <cuda/std/__type_traits/is_nothrow_default_constructible.h>
31
32
  #include <cuda/std/__type_traits/is_nothrow_move_constructible.h>
32
33
  #include <cuda/std/__type_traits/is_same.h>
34
+ #include <cuda/std/__type_traits/is_signed.h>
33
35
  #include <cuda/std/__type_traits/remove_cvref.h>
34
36
  #include <cuda/std/__utility/forward.h>
35
37
  #include <cuda/std/__utility/move.h>
@@ -113,8 +115,30 @@ template <class _Fn, class _Index>
113
115
  class tabulate_output_iterator
114
116
  {
115
117
  private:
116
- ::cuda::std::ranges::__movable_box<_Fn> __func_;
117
- _Index __index_ = 0;
118
+ // Not a base because then the friend operators would be ambiguous
119
+ ::cuda::std::__compressed_movable_box<_Index, _Fn> __store_;
120
+
121
+ [[nodiscard]] _CCCL_API constexpr _Index& __index() noexcept
122
+ {
123
+ return __store_.template __get<0>();
124
+ }
125
+
126
+ [[nodiscard]] _CCCL_API constexpr const _Index& __index() const noexcept
127
+ {
128
+ return __store_.template __get<0>();
129
+ }
130
+
131
+ [[nodiscard]] _CCCL_API constexpr _Fn& __func() noexcept
132
+ {
133
+ return __store_.template __get<1>();
134
+ }
135
+
136
+ [[nodiscard]] _CCCL_API constexpr const _Fn& __func() const noexcept
137
+ {
138
+ return __store_.template __get<1>();
139
+ }
140
+
141
+ static_assert(::cuda::std::is_signed_v<_Index>, "tabulate_output_iterator: _Index must be a signed integer");
118
142
 
119
143
  public:
120
144
  using iterator_concept = ::cuda::std::random_access_iterator_tag;
@@ -124,45 +148,39 @@ public:
124
148
  using pointer = void;
125
149
  using reference = void;
126
150
 
127
- #if _CCCL_HAS_CONCEPTS()
128
- _CCCL_EXEC_CHECK_DISABLE
129
- _CCCL_HIDE_FROM_ABI tabulate_output_iterator()
130
- requires ::cuda::std::default_initializable<_Fn>
131
- = default;
132
- #else // ^^^ _CCCL_HAS_CONCEPTS() ^^^ / vvv !_CCCL_HAS_CONCEPTS() vvv
133
151
  _CCCL_EXEC_CHECK_DISABLE
134
152
  _CCCL_TEMPLATE(class _Fn2 = _Fn)
135
153
  _CCCL_REQUIRES(::cuda::std::default_initializable<_Fn2>)
136
- _CCCL_API constexpr tabulate_output_iterator() noexcept(::cuda::std::is_nothrow_default_constructible_v<_Fn2>) {}
137
- #endif // ^^^ !_CCCL_HAS_CONCEPTS() ^^^
154
+ _CCCL_API constexpr tabulate_output_iterator() noexcept(::cuda::std::is_nothrow_default_constructible_v<_Fn2>)
155
+ : __store_()
156
+ {}
138
157
 
139
158
  //! @brief Constructs a @c tabulate_output_iterator with a given functor and an optional index
140
159
  //! @param __func the output function
141
160
  //! @param __index the position in the output sequence
142
161
  _CCCL_API constexpr tabulate_output_iterator(_Fn __func, _Index __index = 0) noexcept(
143
162
  ::cuda::std::is_nothrow_move_constructible_v<_Fn>)
144
- : __func_(::cuda::std::in_place, ::cuda::std::move(__func))
145
- , __index_(__index)
163
+ : __store_(__index, ::cuda::std::move(__func))
146
164
  {}
147
165
 
148
166
  //! @brief Returns the stored index
149
167
  [[nodiscard]] _CCCL_API constexpr difference_type index() const noexcept
150
168
  {
151
- return __index_;
169
+ return __index();
152
170
  }
153
171
 
154
172
  //! @brief Dereferences the @c tabulate_output_iterator
155
173
  //! @returns A proxy that applies the stored function and index on assignment
156
174
  [[nodiscard]] _CCCL_API constexpr auto operator*() const noexcept
157
175
  {
158
- return __tabulate_proxy<_Fn, _Index>{const_cast<_Fn&>(*__func_), __index_};
176
+ return __tabulate_proxy<_Fn, _Index>{const_cast<_Fn&>(__func()), __index()};
159
177
  }
160
178
 
161
179
  //! @brief Dereferences the @c tabulate_output_iterator
162
180
  //! @returns A proxy that applies the stored function and index on assignment
163
181
  [[nodiscard]] _CCCL_API constexpr auto operator*() noexcept
164
182
  {
165
- return __tabulate_proxy<_Fn, _Index>{*__func_, __index_};
183
+ return __tabulate_proxy<_Fn, _Index>{__func(), __index()};
166
184
  }
167
185
 
168
186
  //! @brief Subscripts the @c tabulate_output_iterator with a given offset
@@ -170,7 +188,7 @@ public:
170
188
  //! @returns A proxy that applies the stored function and index on assignment
171
189
  [[nodiscard]] _CCCL_API constexpr auto operator[](difference_type __n) const noexcept
172
190
  {
173
- return __tabulate_proxy<_Fn, _Index>{const_cast<_Fn&>(*__func_), __index_ + __n};
191
+ return __tabulate_proxy<_Fn, _Index>{const_cast<_Fn&>(__func()), __index() + __n};
174
192
  }
175
193
 
176
194
  //! @brief Subscripts the @c tabulate_output_iterator with a given offset
@@ -178,13 +196,13 @@ public:
178
196
  //! @returns A proxy that applies the stored function and index on assignment
179
197
  [[nodiscard]] _CCCL_API constexpr auto operator[](difference_type __n) noexcept
180
198
  {
181
- return __tabulate_proxy<_Fn, _Index>{*__func_, __index_ + __n};
199
+ return __tabulate_proxy<_Fn, _Index>{__func(), __index() + __n};
182
200
  }
183
201
 
184
202
  //! @brief Increments the @c tabulate_output_iterator by incrementing the stored index
185
203
  _CCCL_API constexpr tabulate_output_iterator& operator++() noexcept
186
204
  {
187
- ++__index_;
205
+ ++__index();
188
206
  return *this;
189
207
  }
190
208
 
@@ -193,14 +211,14 @@ public:
193
211
  operator++(int) noexcept(::cuda::std::is_nothrow_copy_constructible_v<_Fn>)
194
212
  {
195
213
  tabulate_output_iterator __tmp = *this;
196
- ++__index_;
214
+ ++__index();
197
215
  return __tmp;
198
216
  }
199
217
 
200
218
  //! @brief Decrements the @c tabulate_output_iterator by decrementing the stored index
201
219
  _CCCL_API constexpr tabulate_output_iterator& operator--() noexcept
202
220
  {
203
- --__index_;
221
+ --__index();
204
222
  return *this;
205
223
  }
206
224
 
@@ -209,56 +227,61 @@ public:
209
227
  operator--(int) noexcept(::cuda::std::is_nothrow_copy_constructible_v<_Fn>)
210
228
  {
211
229
  tabulate_output_iterator __tmp = *this;
212
- --__index_;
230
+ --__index();
213
231
  return __tmp;
214
232
  }
215
233
 
216
234
  //! @brief Returns a copy of this @c tabulate_output_iterator advanced a given number of elements
217
235
  //! @param __n The number of elements to advance
218
- [[nodiscard]] _CCCL_API constexpr tabulate_output_iterator operator+(difference_type __n) const
236
+ template <int = 0> // Template because compiler will complain about non-literal return type if _Fn is not a literal
237
+ [[nodiscard]] _CCCL_API friend constexpr tabulate_output_iterator
238
+ operator+(const tabulate_output_iterator& __iter, difference_type __n) //
219
239
  noexcept(::cuda::std::is_nothrow_copy_constructible_v<_Fn>)
220
240
  {
221
- return tabulate_output_iterator{*__func_, __index_ + __n};
241
+ return tabulate_output_iterator{__iter.__func(), __iter.__index() + __n};
222
242
  }
223
243
 
224
244
  //! @brief Returns a copy of a @c tabulate_output_iterator advanced a given number of elements
225
245
  //! @param __n The number of elements to advance
226
246
  //! @param __iter The original @c tabulate_output_iterator
247
+ template <int = 0> // Template because compiler will complain about non-literal return type if _Fn is not a literal
227
248
  [[nodiscard]] _CCCL_API friend constexpr tabulate_output_iterator
228
249
  operator+(difference_type __n, const tabulate_output_iterator& __iter) //
229
250
  noexcept(::cuda::std::is_nothrow_copy_constructible_v<_Fn>)
230
251
  {
231
- return __iter + __n;
252
+ return tabulate_output_iterator{__iter.__func(), __iter.__index() + __n};
232
253
  }
233
254
 
234
255
  //! @brief Advances the @c tabulate_output_iterator by a given number of elements
235
256
  //! @param __n The number of elements to advance
236
257
  _CCCL_API constexpr tabulate_output_iterator& operator+=(difference_type __n) noexcept
237
258
  {
238
- __index_ += __n;
259
+ __index() += __n;
239
260
  return *this;
240
261
  }
241
262
 
242
263
  //! @brief Returns a copy of this @c tabulate_output_iterator decremented a given number of elements
243
264
  //! @param __n The number of elements to decremented
244
- [[nodiscard]] _CCCL_API constexpr tabulate_output_iterator operator-(difference_type __n) const
265
+ template <int = 0> // Template because compiler will complain about non-literal return type if _Fn is not a literal
266
+ [[nodiscard]] _CCCL_API friend constexpr tabulate_output_iterator
267
+ operator-(const tabulate_output_iterator& __iter, difference_type __n) //
245
268
  noexcept(::cuda::std::is_nothrow_copy_constructible_v<_Fn>)
246
269
  {
247
- return tabulate_output_iterator{*__func_, __index_ - __n};
270
+ return tabulate_output_iterator{__iter.__func(), __iter.__index() - __n};
248
271
  }
249
272
 
250
273
  //! @brief Returns the distance between two @c tabulate_output_iterator 's
251
274
  [[nodiscard]] _CCCL_API friend constexpr difference_type
252
275
  operator-(const tabulate_output_iterator& __lhs, const tabulate_output_iterator& __rhs) noexcept
253
276
  {
254
- return __rhs.__index_ - __lhs.__index_;
277
+ return __rhs.__index() - __lhs.__index();
255
278
  }
256
279
 
257
280
  //! @brief Decrements the @c tabulate_output_iterator by a given number of elements
258
281
  //! @param __n The number of elements to decrement
259
282
  _CCCL_API constexpr tabulate_output_iterator& operator-=(difference_type __n) noexcept
260
283
  {
261
- __index_ -= __n;
284
+ __index() -= __n;
262
285
  return *this;
263
286
  }
264
287
 
@@ -266,7 +289,7 @@ public:
266
289
  [[nodiscard]] _CCCL_API friend constexpr bool
267
290
  operator==(const tabulate_output_iterator& __lhs, const tabulate_output_iterator& __rhs) noexcept
268
291
  {
269
- return __lhs.__index_ == __rhs.__index_;
292
+ return __lhs.__index() == __rhs.__index();
270
293
  }
271
294
 
272
295
  #if _CCCL_STD_VER <= 2017
@@ -274,7 +297,7 @@ public:
274
297
  [[nodiscard]] _CCCL_API friend constexpr bool
275
298
  operator!=(const tabulate_output_iterator& __lhs, const tabulate_output_iterator& __rhs) noexcept
276
299
  {
277
- return __lhs.__index_ != __rhs.__index_;
300
+ return __lhs.__index() != __rhs.__index();
278
301
  }
279
302
  #endif // _CCCL_STD_VER <= 2017
280
303
 
@@ -283,35 +306,35 @@ public:
283
306
  [[nodiscard]] _CCCL_API friend constexpr strong_ordering
284
307
  operator<=>(const tabulate_output_iterator& __lhs, const tabulate_output_iterator& __rhs) noexcept
285
308
  {
286
- return __lhs.__index_ <=> __rhs.__index_;
309
+ return __lhs.__index() <=> __rhs.__index();
287
310
  }
288
311
  #else // ^^^ _LIBCUDACXX_HAS_SPACESHIP_OPERATOR() ^^^ / vvv !_LIBCUDACXX_HAS_SPACESHIP_OPERATOR() vvv
289
312
  //! @brief Compares two @c tabulate_output_iterator for less than by comparing their indices
290
313
  [[nodiscard]] _CCCL_API friend constexpr bool
291
314
  operator<(const tabulate_output_iterator& __lhs, const tabulate_output_iterator& __rhs) noexcept
292
315
  {
293
- return __lhs.__index_ < __rhs.__index_;
316
+ return __lhs.__index() < __rhs.__index();
294
317
  }
295
318
 
296
319
  //! @brief Compares two @c tabulate_output_iterator for less equal by comparing their indices
297
320
  [[nodiscard]] _CCCL_API friend constexpr bool
298
321
  operator<=(const tabulate_output_iterator& __lhs, const tabulate_output_iterator& __rhs) noexcept
299
322
  {
300
- return __lhs.__index_ <= __rhs.__index_;
323
+ return __lhs.__index() <= __rhs.__index();
301
324
  }
302
325
 
303
326
  //! @brief Compares two @c tabulate_output_iterator for greater than by comparing their indices
304
327
  [[nodiscard]] _CCCL_API friend constexpr bool
305
328
  operator>(const tabulate_output_iterator& __lhs, const tabulate_output_iterator& __rhs) noexcept
306
329
  {
307
- return __lhs.__index_ > __rhs.__index_;
330
+ return __lhs.__index() > __rhs.__index();
308
331
  }
309
332
 
310
333
  //! @brief Compares two @c tabulate_output_iterator for greater equal by comparing their indices
311
334
  [[nodiscard]] _CCCL_API friend constexpr bool
312
335
  operator>=(const tabulate_output_iterator& __lhs, const tabulate_output_iterator& __rhs) noexcept
313
336
  {
314
- return __lhs.__index_ >= __rhs.__index_;
337
+ return __lhs.__index() >= __rhs.__index();
315
338
  }
316
339
  #endif // !_LIBCUDACXX_HAS_SPACESHIP_OPERATOR()
317
340
  };
@@ -30,6 +30,7 @@
30
30
  #include <cuda/std/__functional/invoke.h>
31
31
  #include <cuda/std/__iterator/concepts.h>
32
32
  #include <cuda/std/__iterator/iterator_traits.h>
33
+ #include <cuda/std/__ranges/compressed_movable_box.h>
33
34
  #include <cuda/std/__ranges/concepts.h>
34
35
  #include <cuda/std/__ranges/movable_box.h>
35
36
  #include <cuda/std/__type_traits/conditional.h>
@@ -41,6 +42,7 @@
41
42
  #include <cuda/std/__type_traits/is_object.h>
42
43
  #include <cuda/std/__type_traits/is_reference.h>
43
44
  #include <cuda/std/__type_traits/remove_cvref.h>
45
+ #include <cuda/std/__utility/declval.h>
44
46
  #include <cuda/std/__utility/forward.h>
45
47
  #include <cuda/std/__utility/move.h>
46
48
 
@@ -153,11 +155,40 @@ public:
153
155
  template <class _InputFn, class _OutputFn, class _Iter>
154
156
  class transform_input_output_iterator
155
157
  {
156
- public:
157
- _Iter __current_{};
158
- ::cuda::std::ranges::__movable_box<_InputFn> __input_func_{};
159
- ::cuda::std::ranges::__movable_box<_OutputFn> __output_func_{};
158
+ // Not a base because then the friend operators would be ambiguous
159
+ ::cuda::std::__compressed_movable_box<_Iter, _InputFn, _OutputFn> __store_;
160
+
161
+ [[nodiscard]] _CCCL_API constexpr _Iter& __iter() noexcept
162
+ {
163
+ return __store_.template __get<0>();
164
+ }
165
+
166
+ [[nodiscard]] _CCCL_API constexpr const _Iter& __iter() const noexcept
167
+ {
168
+ return __store_.template __get<0>();
169
+ }
170
+
171
+ [[nodiscard]] _CCCL_API constexpr _InputFn& __input_func() noexcept
172
+ {
173
+ return __store_.template __get<1>();
174
+ }
175
+
176
+ [[nodiscard]] _CCCL_API constexpr const _InputFn& __input_func() const noexcept
177
+ {
178
+ return __store_.template __get<1>();
179
+ }
180
+
181
+ [[nodiscard]] _CCCL_API constexpr _OutputFn& __output_func() noexcept
182
+ {
183
+ return __store_.template __get<2>();
184
+ }
185
+
186
+ [[nodiscard]] _CCCL_API constexpr const _OutputFn& __output_func() const noexcept
187
+ {
188
+ return __store_.template __get<2>();
189
+ }
160
190
 
191
+ public:
161
192
  using iterator_concept = ::cuda::std::conditional_t<
162
193
  ::cuda::std::__has_random_access_traversal<_Iter>,
163
194
  ::cuda::std::random_access_iterator_tag,
@@ -183,13 +214,6 @@ public:
183
214
  "dereferencing _Iter");
184
215
 
185
216
  //! @brief Default constructs a @c transform_input_output_iterator with a value initialized iterator and functors
186
- #if _CCCL_HAS_CONCEPTS()
187
- _CCCL_EXEC_CHECK_DISABLE
188
- _CCCL_HIDE_FROM_ABI transform_input_output_iterator()
189
- requires ::cuda::std::default_initializable<_Iter> && ::cuda::std::default_initializable<_InputFn>
190
- && ::cuda::std::default_initializable<_OutputFn>
191
- = default;
192
- #else // ^^^ _CCCL_HAS_CONCEPTS() ^^^ / vvv !_CCCL_HAS_CONCEPTS() vvv
193
217
  _CCCL_EXEC_CHECK_DISABLE
194
218
  _CCCL_TEMPLATE(class _Iter2 = _Iter, class _InputFn2 = _InputFn, class _OutputFn2 = _OutputFn)
195
219
  _CCCL_REQUIRES(::cuda::std::default_initializable<_Iter2> _CCCL_AND ::cuda::std::default_initializable<_InputFn2>
@@ -198,8 +222,8 @@ public:
198
222
  ::cuda::std::is_nothrow_default_constructible_v<_Iter2>
199
223
  && ::cuda::std::is_nothrow_default_constructible_v<_InputFn2>
200
224
  && ::cuda::std::is_nothrow_default_constructible_v<_OutputFn2>)
225
+ : __store_()
201
226
  {}
202
- #endif // ^^^ !_CCCL_HAS_CONCEPTS() ^^^
203
227
 
204
228
  //! @brief Constructs a @c transform_input_output_iterator with base iterator, input functor and output functor
205
229
  //! @param __iter The iterator to transform
@@ -210,22 +234,20 @@ public:
210
234
  noexcept(::cuda::std::is_nothrow_move_constructible_v<_Iter>
211
235
  && ::cuda::std::is_nothrow_move_constructible_v<_InputFn>
212
236
  && ::cuda::std::is_nothrow_move_constructible_v<_OutputFn>)
213
- : __current_(::cuda::std::move(__iter))
214
- , __input_func_(::cuda::std::in_place, ::cuda::std::move(__input_func))
215
- , __output_func_(::cuda::std::in_place, ::cuda::std::move(__output_func))
237
+ : __store_(::cuda::std::move(__iter), ::cuda::std::move(__input_func), ::cuda::std::move(__output_func))
216
238
  {}
217
239
 
218
240
  //! @brief Returns a const reference to the base iterator stored
219
241
  [[nodiscard]] _CCCL_API constexpr const _Iter& base() const& noexcept
220
242
  {
221
- return __current_;
243
+ return __iter();
222
244
  }
223
245
 
224
246
  //! @brief Extracts the stored base iterator
225
247
  _CCCL_EXEC_CHECK_DISABLE
226
248
  [[nodiscard]] _CCCL_API constexpr _Iter base() && noexcept(::cuda::std::is_nothrow_move_constructible_v<_Iter>)
227
249
  {
228
- return ::cuda::std::move(__current_);
250
+ return ::cuda::std::move(__iter());
229
251
  }
230
252
 
231
253
  //! @brief Dereferences the @c transform_input_output_iterator. Returns a proxy that transforms values read from the
@@ -235,7 +257,7 @@ public:
235
257
  noexcept(::cuda::std::is_nothrow_copy_constructible_v<_Iter>)
236
258
  {
237
259
  return __transform_input_output_proxy{
238
- __current_, const_cast<_InputFn&>(*__input_func_), const_cast<_OutputFn&>(*__output_func_)};
260
+ __iter(), const_cast<_InputFn&>(__input_func()), const_cast<_OutputFn&>(__output_func())};
239
261
  }
240
262
 
241
263
  //! @brief Dereferences the @c transform_input_output_iterator. Returns a proxy that transforms values read from the
@@ -243,7 +265,7 @@ public:
243
265
  _CCCL_EXEC_CHECK_DISABLE
244
266
  [[nodiscard]] _CCCL_API constexpr reference operator*() noexcept(::cuda::std::is_nothrow_copy_constructible_v<_Iter>)
245
267
  {
246
- return __transform_input_output_proxy{__current_, *__input_func_, *__output_func_};
268
+ return __transform_input_output_proxy{__iter(), __input_func(), __output_func()};
247
269
  }
248
270
 
249
271
  //! @brief Subscripts the @c transform_input_output_iterator. Returns a proxy that transforms values read from the
@@ -254,10 +276,11 @@ public:
254
276
  _CCCL_TEMPLATE(class _Iter2 = _Iter)
255
277
  _CCCL_REQUIRES(::cuda::std::__has_random_access_traversal<_Iter2>)
256
278
  [[nodiscard]] _CCCL_API constexpr reference operator[](difference_type __n) const
257
- noexcept(::cuda::std::is_nothrow_copy_constructible_v<_Iter2> && noexcept(__current_ + __n))
279
+ noexcept(::cuda::std::is_nothrow_copy_constructible_v<_Iter2>
280
+ && noexcept(::cuda::std::declval<const _Iter2&>() + __n))
258
281
  {
259
282
  return __transform_input_output_proxy{
260
- __current_ + __n, const_cast<_InputFn&>(*__input_func_), const_cast<_OutputFn&>(*__output_func_)};
283
+ __iter() + __n, const_cast<_InputFn&>(__input_func()), const_cast<_OutputFn&>(__output_func())};
261
284
  }
262
285
 
263
286
  //! @brief Subscripts the @c transform_input_output_iterator. Returns a proxy that transforms values read from the
@@ -268,23 +291,23 @@ public:
268
291
  _CCCL_TEMPLATE(class _Iter2 = _Iter)
269
292
  _CCCL_REQUIRES(::cuda::std::__has_random_access_traversal<_Iter2>)
270
293
  [[nodiscard]] _CCCL_API constexpr reference operator[](difference_type __n) noexcept(
271
- ::cuda::std::is_nothrow_copy_constructible_v<_Iter2> && noexcept(__current_ + __n))
294
+ ::cuda::std::is_nothrow_copy_constructible_v<_Iter2> && noexcept(::cuda::std::declval<const _Iter2&>() + __n))
272
295
  {
273
- return __transform_input_output_proxy{__current_ + __n, *__input_func_, *__output_func_};
296
+ return __transform_input_output_proxy{__iter() + __n, __input_func(), __output_func()};
274
297
  }
275
298
 
276
299
  //! @brief Increments the stored iterator
277
300
  _CCCL_EXEC_CHECK_DISABLE
278
- _CCCL_API constexpr transform_input_output_iterator& operator++() noexcept(noexcept(++__current_))
301
+ _CCCL_API constexpr transform_input_output_iterator& operator++() noexcept(noexcept(++::cuda::std::declval<_Iter&>()))
279
302
  {
280
- ++__current_;
303
+ ++__iter();
281
304
  return *this;
282
305
  }
283
306
 
284
307
  //! @brief Increments the stored iterator
285
308
  _CCCL_EXEC_CHECK_DISABLE
286
309
  _CCCL_API constexpr transform_input_output_iterator operator++(int) noexcept(
287
- noexcept(++__current_)
310
+ noexcept(++::cuda::std::declval<_Iter&>())
288
311
  && ::cuda::std::is_nothrow_copy_constructible_v<_Iter> && ::cuda::std::is_nothrow_copy_constructible_v<_InputFn>
289
312
  && ::cuda::std::is_nothrow_copy_constructible_v<_OutputFn>)
290
313
  {
@@ -297,9 +320,9 @@ public:
297
320
  _CCCL_EXEC_CHECK_DISABLE
298
321
  _CCCL_TEMPLATE(class _Iter2 = _Iter)
299
322
  _CCCL_REQUIRES(::cuda::std::__has_bidirectional_traversal<_Iter2>)
300
- _CCCL_API constexpr transform_input_output_iterator& operator--() noexcept(noexcept(--__current_))
323
+ _CCCL_API constexpr transform_input_output_iterator& operator--() noexcept(noexcept(--::cuda::std::declval<_Iter2&>()))
301
324
  {
302
- --__current_;
325
+ --__iter();
303
326
  return *this;
304
327
  }
305
328
 
@@ -307,8 +330,8 @@ public:
307
330
  _CCCL_EXEC_CHECK_DISABLE
308
331
  _CCCL_TEMPLATE(class _Iter2 = _Iter)
309
332
  _CCCL_REQUIRES(::cuda::std::__has_bidirectional_traversal<_Iter2>)
310
- _CCCL_API constexpr transform_input_output_iterator
311
- operator--(int) noexcept(::cuda::std::is_nothrow_copy_constructible_v<_Iter> && noexcept(--__current_))
333
+ _CCCL_API constexpr transform_input_output_iterator operator--(int) noexcept(
334
+ ::cuda::std::is_nothrow_copy_constructible_v<_Iter> && noexcept(--::cuda::std::declval<_Iter2&>()))
312
335
  {
313
336
  auto __tmp = *this;
314
337
  --*this;
@@ -321,9 +344,9 @@ public:
321
344
  _CCCL_TEMPLATE(class _Iter2 = _Iter)
322
345
  _CCCL_REQUIRES(::cuda::std::__has_random_access_traversal<_Iter2>)
323
346
  _CCCL_API constexpr transform_input_output_iterator&
324
- operator+=(difference_type __n) noexcept(noexcept(__current_ += __n))
347
+ operator+=(difference_type __n) noexcept(noexcept(::cuda::std::declval<_Iter2&>() += __n))
325
348
  {
326
- __current_ += __n;
349
+ __iter() += __n;
327
350
  return *this;
328
351
  }
329
352
 
@@ -338,7 +361,7 @@ public:
338
361
  && noexcept(::cuda::std::declval<const _Iter2&>() + difference_type{}))
339
362
  _CCCL_TRAILING_REQUIRES(transform_input_output_iterator)(::cuda::std::__has_random_access_traversal<_Iter2>)
340
363
  {
341
- return transform_input_output_iterator{__iter.__current_ + __n, *__iter.__input_func_, *__iter.__output_func_};
364
+ return transform_input_output_iterator{__iter.__iter() + __n, __iter.__input_func(), __iter.__output_func()};
342
365
  }
343
366
 
344
367
  //! @brief Returns a copy of a @c transform_input_output_iterator advanced by a given number of elements
@@ -352,7 +375,7 @@ public:
352
375
  && noexcept(::cuda::std::declval<const _Iter2&>() + difference_type{}))
353
376
  _CCCL_TRAILING_REQUIRES(transform_input_output_iterator)(::cuda::std::__has_random_access_traversal<_Iter2>)
354
377
  {
355
- return transform_input_output_iterator{__iter.__current_ + __n, *__iter.__input_func_, *__iter.__output_func_};
378
+ return transform_input_output_iterator{__iter.__iter() + __n, __iter.__input_func(), __iter.__output_func()};
356
379
  }
357
380
 
358
381
  //! @brief Decrements the @c transform_input_output_iterator by a given number of elements
@@ -361,9 +384,9 @@ public:
361
384
  _CCCL_TEMPLATE(class _Iter2 = _Iter)
362
385
  _CCCL_REQUIRES(::cuda::std::__has_random_access_traversal<_Iter2>)
363
386
  _CCCL_API constexpr transform_input_output_iterator&
364
- operator-=(difference_type __n) noexcept(noexcept(__current_ -= __n))
387
+ operator-=(difference_type __n) noexcept(noexcept(::cuda::std::declval<_Iter2&>() -= __n))
365
388
  {
366
- __current_ -= __n;
389
+ __iter() -= __n;
367
390
  return *this;
368
391
  }
369
392
 
@@ -378,18 +401,25 @@ public:
378
401
  && noexcept(::cuda::std::declval<const _Iter2&>() - difference_type{}))
379
402
  _CCCL_TRAILING_REQUIRES(transform_input_output_iterator)(::cuda::std::__has_random_access_traversal<_Iter2>)
380
403
  {
381
- return transform_input_output_iterator{__iter.__current_ - __n, *__iter.__input_func_, *__iter.__output_func_};
404
+ return transform_input_output_iterator{__iter.__iter() - __n, __iter.__input_func(), __iter.__output_func()};
382
405
  }
383
406
 
407
+ template <class _Iter2>
408
+ static constexpr bool __can_difference =
409
+ (::cuda::std::__has_random_access_traversal<_Iter2> || ::cuda::std::sized_sentinel_for<_Iter2, _Iter2>);
410
+
411
+ template <class _Iter2>
412
+ static constexpr bool __noexcept_difference =
413
+ noexcept(::cuda::std::declval<const _Iter2&>() - ::cuda::std::declval<const _Iter2&>());
414
+
384
415
  //! @brief Returns the distance between two @c transform_input_output_iterator
385
416
  _CCCL_EXEC_CHECK_DISABLE
386
417
  template <class _Iter2 = _Iter>
387
- [[nodiscard]] _CCCL_API friend constexpr auto
388
- operator-(const transform_input_output_iterator& __lhs, const transform_input_output_iterator& __rhs) noexcept(
389
- noexcept(::cuda::std::declval<const _Iter2&>() - ::cuda::std::declval<const _Iter2&>()))
390
- _CCCL_TRAILING_REQUIRES(difference_type)(::cuda::std::sized_sentinel_for<_Iter2, _Iter2>)
418
+ [[nodiscard]] _CCCL_API friend constexpr auto operator-(const transform_input_output_iterator& __lhs,
419
+ const transform_input_output_iterator& __rhs) //
420
+ noexcept(__noexcept_difference<_Iter2>) _CCCL_TRAILING_REQUIRES(difference_type)(__can_difference<_Iter2>)
391
421
  {
392
- return __lhs.__current_ - __rhs.__current_;
422
+ return __lhs.__iter() - __rhs.__iter();
393
423
  }
394
424
 
395
425
  //! @brief Compares two @c transform_input_output_iterator for equality by comparing the stored iterators
@@ -400,7 +430,7 @@ public:
400
430
  noexcept(::cuda::std::declval<const _Iter2&>() == ::cuda::std::declval<const _Iter2&>()))
401
431
  _CCCL_TRAILING_REQUIRES(bool)(::cuda::std::equality_comparable<_Iter2>)
402
432
  {
403
- return __lhs.__current_ == __rhs.__current_;
433
+ return __lhs.__iter() == __rhs.__iter();
404
434
  }
405
435
 
406
436
  #if _CCCL_STD_VER <= 2017
@@ -412,7 +442,7 @@ public:
412
442
  noexcept(::cuda::std::declval<const _Iter2&>() != ::cuda::std::declval<const _Iter2&>()))
413
443
  _CCCL_TRAILING_REQUIRES(bool)(::cuda::std::equality_comparable<_Iter2>)
414
444
  {
415
- return __lhs.__current_ != __rhs.__current_;
445
+ return __lhs.__iter() != __rhs.__iter();
416
446
  }
417
447
  #endif // _CCCL_STD_VER <= 2017
418
448
 
@@ -424,7 +454,7 @@ public:
424
454
  noexcept(::cuda::std::declval<const _Iter2&>() < ::cuda::std::declval<const _Iter2&>()))
425
455
  _CCCL_TRAILING_REQUIRES(bool)(::cuda::std::__has_random_access_traversal<_Iter2>)
426
456
  {
427
- return __lhs.__current_ < __rhs.__current_;
457
+ return __lhs.__iter() < __rhs.__iter();
428
458
  }
429
459
 
430
460
  //! @brief Compares two @c transform_input_output_iterator for greater than by comparing the stored iterators
@@ -435,7 +465,7 @@ public:
435
465
  noexcept(::cuda::std::declval<const _Iter2&>() < ::cuda::std::declval<const _Iter2&>()))
436
466
  _CCCL_TRAILING_REQUIRES(bool)(::cuda::std::__has_random_access_traversal<_Iter2>)
437
467
  {
438
- return __lhs.__current_ > __rhs.__current_;
468
+ return __lhs.__iter() > __rhs.__iter();
439
469
  }
440
470
 
441
471
  //! @brief Compares two @c transform_input_output_iterator for less equal by comparing the stored iterators
@@ -446,7 +476,7 @@ public:
446
476
  noexcept(::cuda::std::declval<const _Iter2&>() < ::cuda::std::declval<const _Iter2&>()))
447
477
  _CCCL_TRAILING_REQUIRES(bool)(::cuda::std::__has_random_access_traversal<_Iter2>)
448
478
  {
449
- return __lhs.__current_ <= __rhs.__current_;
479
+ return __lhs.__iter() <= __rhs.__iter();
450
480
  }
451
481
 
452
482
  //! @brief Compares two @c transform_input_output_iterator for greater equal by comparing the stored iterators
@@ -457,7 +487,7 @@ public:
457
487
  noexcept(::cuda::std::declval<const _Iter2&>() < ::cuda::std::declval<const _Iter2&>()))
458
488
  _CCCL_TRAILING_REQUIRES(bool)(::cuda::std::__has_random_access_traversal<_Iter2>)
459
489
  {
460
- return __lhs.__current_ >= __rhs.__current_;
490
+ return __lhs.__iter() >= __rhs.__iter();
461
491
  }
462
492
 
463
493
  #if _LIBCUDACXX_HAS_SPACESHIP_OPERATOR()
@@ -471,7 +501,7 @@ public:
471
501
  _CCCL_TRAILING_REQUIRES(bool)(
472
502
  ::cuda::std::__has_random_access_traversal<_Iter2>&& ::cuda::std::three_way_comparable<_Iter2>)
473
503
  {
474
- return __lhs.__current_ <=> __rhs.__current_;
504
+ return __lhs.__iter() <=> __rhs.__iter();
475
505
  }
476
506
  #endif // !_LIBCUDACXX_HAS_NO_SPACESHIP_OPERATOR
477
507
  };