cuda-cccl 0.3.2__cp313-cp313-manylinux_2_24_aarch64.whl → 0.3.4__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 (911) hide show
  1. cuda/cccl/headers/include/cub/agent/agent_adjacent_difference.cuh +12 -38
  2. cuda/cccl/headers/include/cub/agent/agent_batch_memcpy.cuh +16 -40
  3. cuda/cccl/headers/include/cub/agent/agent_for.cuh +2 -28
  4. cuda/cccl/headers/include/cub/agent/agent_histogram.cuh +24 -56
  5. cuda/cccl/headers/include/cub/agent/agent_merge_sort.cuh +12 -38
  6. cuda/cccl/headers/include/cub/agent/agent_radix_sort_downsweep.cuh +31 -56
  7. cuda/cccl/headers/include/cub/agent/agent_radix_sort_histogram.cuh +31 -35
  8. cuda/cccl/headers/include/cub/agent/agent_radix_sort_onesweep.cuh +47 -48
  9. cuda/cccl/headers/include/cub/agent/agent_radix_sort_upsweep.cuh +39 -42
  10. cuda/cccl/headers/include/cub/agent/agent_reduce.cuh +33 -60
  11. cuda/cccl/headers/include/cub/agent/agent_reduce_by_key.cuh +18 -44
  12. cuda/cccl/headers/include/cub/agent/agent_rle.cuh +26 -55
  13. cuda/cccl/headers/include/cub/agent/agent_scan.cuh +22 -49
  14. cuda/cccl/headers/include/cub/agent/agent_scan_by_key.cuh +15 -41
  15. cuda/cccl/headers/include/cub/agent/agent_segmented_radix_sort.cuh +9 -35
  16. cuda/cccl/headers/include/cub/agent/agent_select_if.cuh +20 -49
  17. cuda/cccl/headers/include/cub/agent/agent_sub_warp_merge_sort.cuh +14 -40
  18. cuda/cccl/headers/include/cub/agent/agent_three_way_partition.cuh +18 -40
  19. cuda/cccl/headers/include/cub/agent/agent_topk.cuh +0 -2
  20. cuda/cccl/headers/include/cub/agent/agent_unique_by_key.cuh +20 -46
  21. cuda/cccl/headers/include/cub/agent/single_pass_scan_operators.cuh +3 -28
  22. cuda/cccl/headers/include/cub/block/block_adjacent_difference.cuh +7 -31
  23. cuda/cccl/headers/include/cub/block/block_discontinuity.cuh +10 -34
  24. cuda/cccl/headers/include/cub/block/block_exchange.cuh +120 -154
  25. cuda/cccl/headers/include/cub/block/block_histogram.cuh +28 -52
  26. cuda/cccl/headers/include/cub/block/block_load.cuh +124 -146
  27. cuda/cccl/headers/include/cub/block/block_load_to_shared.cuh +0 -16
  28. cuda/cccl/headers/include/cub/block/block_merge_sort.cuh +58 -87
  29. cuda/cccl/headers/include/cub/block/block_radix_rank.cuh +81 -100
  30. cuda/cccl/headers/include/cub/block/block_radix_sort.cuh +92 -156
  31. cuda/cccl/headers/include/cub/block/block_raking_layout.cuh +8 -32
  32. cuda/cccl/headers/include/cub/block/block_reduce.cuh +21 -46
  33. cuda/cccl/headers/include/cub/block/block_run_length_decode.cuh +51 -79
  34. cuda/cccl/headers/include/cub/block/block_scan.cuh +94 -401
  35. cuda/cccl/headers/include/cub/block/block_shuffle.cuh +10 -34
  36. cuda/cccl/headers/include/cub/block/block_store.cuh +73 -97
  37. cuda/cccl/headers/include/cub/block/radix_rank_sort_operations.cuh +2 -29
  38. cuda/cccl/headers/include/cub/block/specializations/block_histogram_atomic.cuh +5 -29
  39. cuda/cccl/headers/include/cub/block/specializations/block_histogram_sort.cuh +25 -49
  40. cuda/cccl/headers/include/cub/block/specializations/block_reduce_raking.cuh +12 -34
  41. cuda/cccl/headers/include/cub/block/specializations/block_reduce_raking_commutative_only.cuh +10 -34
  42. cuda/cccl/headers/include/cub/block/specializations/block_reduce_warp_reductions.cuh +3 -27
  43. cuda/cccl/headers/include/cub/block/specializations/block_scan_raking.cuh +12 -36
  44. cuda/cccl/headers/include/cub/block/specializations/block_scan_warp_scans.cuh +9 -33
  45. cuda/cccl/headers/include/cub/config.cuh +2 -26
  46. cuda/cccl/headers/include/cub/cub.cuh +3 -27
  47. cuda/cccl/headers/include/cub/detail/array_utils.cuh +2 -26
  48. cuda/cccl/headers/include/cub/detail/choose_offset.cuh +2 -28
  49. cuda/cccl/headers/include/cub/detail/detect_cuda_runtime.cuh +3 -27
  50. cuda/cccl/headers/include/cub/detail/device_double_buffer.cuh +0 -2
  51. cuda/cccl/headers/include/cub/detail/device_memory_resource.cuh +1 -3
  52. cuda/cccl/headers/include/cub/detail/fast_modulo_division.cuh +2 -28
  53. cuda/cccl/headers/include/cub/detail/integer_utils.cuh +0 -2
  54. cuda/cccl/headers/include/cub/detail/launcher/cuda_driver.cuh +0 -2
  55. cuda/cccl/headers/include/cub/detail/launcher/cuda_runtime.cuh +0 -2
  56. cuda/cccl/headers/include/cub/detail/mdspan_utils.cuh +0 -2
  57. cuda/cccl/headers/include/cub/detail/ptx-json/README.md +7 -12
  58. cuda/cccl/headers/include/cub/detail/ptx-json/array.h +6 -33
  59. cuda/cccl/headers/include/cub/detail/ptx-json/json.h +13 -36
  60. cuda/cccl/headers/include/cub/detail/ptx-json/object.h +9 -38
  61. cuda/cccl/headers/include/cub/detail/ptx-json/string.h +58 -32
  62. cuda/cccl/headers/include/cub/detail/ptx-json/value.h +51 -51
  63. cuda/cccl/headers/include/cub/detail/ptx-json-parser.h +7 -31
  64. cuda/cccl/headers/include/cub/detail/rfa.cuh +2 -27
  65. cuda/cccl/headers/include/cub/detail/strong_load.cuh +3 -29
  66. cuda/cccl/headers/include/cub/detail/strong_store.cuh +3 -29
  67. cuda/cccl/headers/include/cub/detail/temporary_storage.cuh +2 -9
  68. cuda/cccl/headers/include/cub/detail/type_traits.cuh +0 -2
  69. cuda/cccl/headers/include/cub/detail/uninitialized_copy.cuh +6 -31
  70. cuda/cccl/headers/include/cub/detail/unsafe_bitcast.cuh +2 -25
  71. cuda/cccl/headers/include/cub/device/device_adjacent_difference.cuh +2 -26
  72. cuda/cccl/headers/include/cub/device/device_for.cuh +3 -5
  73. cuda/cccl/headers/include/cub/device/device_histogram.cuh +3 -27
  74. cuda/cccl/headers/include/cub/device/device_memcpy.cuh +2 -26
  75. cuda/cccl/headers/include/cub/device/device_merge_sort.cuh +2 -26
  76. cuda/cccl/headers/include/cub/device/device_partition.cuh +3 -27
  77. cuda/cccl/headers/include/cub/device/device_radix_sort.cuh +3 -27
  78. cuda/cccl/headers/include/cub/device/device_reduce.cuh +10 -31
  79. cuda/cccl/headers/include/cub/device/device_run_length_encode.cuh +3 -27
  80. cuda/cccl/headers/include/cub/device/device_scan.cuh +16 -34
  81. cuda/cccl/headers/include/cub/device/device_segmented_radix_sort.cuh +3 -27
  82. cuda/cccl/headers/include/cub/device/device_segmented_reduce.cuh +3 -27
  83. cuda/cccl/headers/include/cub/device/device_segmented_sort.cuh +2 -26
  84. cuda/cccl/headers/include/cub/device/device_select.cuh +3 -27
  85. cuda/cccl/headers/include/cub/device/dispatch/dispatch_adjacent_difference.cuh +2 -28
  86. cuda/cccl/headers/include/cub/device/dispatch/dispatch_batch_memcpy.cuh +2 -27
  87. cuda/cccl/headers/include/cub/device/dispatch/dispatch_copy_mdspan.cuh +0 -2
  88. cuda/cccl/headers/include/cub/device/dispatch/dispatch_for.cuh +3 -29
  89. cuda/cccl/headers/include/cub/device/dispatch/dispatch_histogram.cuh +14 -34
  90. cuda/cccl/headers/include/cub/device/dispatch/dispatch_merge_sort.cuh +5 -30
  91. cuda/cccl/headers/include/cub/device/dispatch/dispatch_radix_sort.cuh +4 -29
  92. cuda/cccl/headers/include/cub/device/dispatch/dispatch_reduce.cuh +5 -32
  93. cuda/cccl/headers/include/cub/device/dispatch/dispatch_reduce_by_key.cuh +3 -29
  94. cuda/cccl/headers/include/cub/device/dispatch/dispatch_reduce_deterministic.cuh +2 -29
  95. cuda/cccl/headers/include/cub/device/dispatch/dispatch_reduce_nondeterministic.cuh +1 -2
  96. cuda/cccl/headers/include/cub/device/dispatch/dispatch_rle.cuh +47 -59
  97. cuda/cccl/headers/include/cub/device/dispatch/dispatch_scan.cuh +21 -30
  98. cuda/cccl/headers/include/cub/device/dispatch/dispatch_scan_by_key.cuh +2 -27
  99. cuda/cccl/headers/include/cub/device/dispatch/dispatch_segmented_sort.cuh +3 -27
  100. cuda/cccl/headers/include/cub/device/dispatch/dispatch_select_if.cuh +3 -27
  101. cuda/cccl/headers/include/cub/device/dispatch/dispatch_streaming_reduce.cuh +0 -2
  102. cuda/cccl/headers/include/cub/device/dispatch/dispatch_streaming_reduce_by_key.cuh +51 -36
  103. cuda/cccl/headers/include/cub/device/dispatch/dispatch_three_way_partition.cuh +3 -28
  104. cuda/cccl/headers/include/cub/device/dispatch/dispatch_topk.cuh +0 -1
  105. cuda/cccl/headers/include/cub/device/dispatch/dispatch_transform.cuh +27 -55
  106. cuda/cccl/headers/include/cub/device/dispatch/dispatch_unique_by_key.cuh +4 -28
  107. cuda/cccl/headers/include/cub/device/dispatch/kernels/{for_each.cuh → kernel_for_each.cuh} +0 -2
  108. cuda/cccl/headers/include/cub/device/dispatch/kernels/{histogram.cuh → kernel_histogram.cuh} +149 -157
  109. cuda/cccl/headers/include/cub/device/dispatch/kernels/{merge_sort.cuh → kernel_merge_sort.cuh} +0 -2
  110. cuda/cccl/headers/include/cub/device/dispatch/kernels/{radix_sort.cuh → kernel_radix_sort.cuh} +0 -2
  111. cuda/cccl/headers/include/cub/device/dispatch/kernels/{reduce.cuh → kernel_reduce.cuh} +2 -28
  112. cuda/cccl/headers/include/cub/device/dispatch/kernels/{scan.cuh → kernel_scan.cuh} +2 -28
  113. cuda/cccl/headers/include/cub/device/dispatch/kernels/{segmented_reduce.cuh → kernel_segmented_reduce.cuh} +3 -29
  114. cuda/cccl/headers/include/cub/device/dispatch/kernels/{segmented_sort.cuh → kernel_segmented_sort.cuh} +0 -1
  115. cuda/cccl/headers/include/cub/device/dispatch/kernels/{three_way_partition.cuh → kernel_three_way_partition.cuh} +0 -1
  116. cuda/cccl/headers/include/cub/device/dispatch/kernels/{transform.cuh → kernel_transform.cuh} +11 -11
  117. cuda/cccl/headers/include/cub/device/dispatch/kernels/{unique_by_key.cuh → kernel_unique_by_key.cuh} +0 -1
  118. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_adjacent_difference.cuh +2 -26
  119. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_batch_memcpy.cuh +2 -26
  120. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_for.cuh +2 -28
  121. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_histogram.cuh +6 -26
  122. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_merge.cuh +2 -26
  123. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_merge_sort.cuh +5 -31
  124. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_radix_sort.cuh +31 -33
  125. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_reduce.cuh +15 -40
  126. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_reduce_by_key.cuh +2 -26
  127. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_run_length_encode.cuh +2 -28
  128. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_scan.cuh +20 -44
  129. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_scan_by_key.cuh +2 -26
  130. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_segmented_sort.cuh +20 -45
  131. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_select_if.cuh +2 -27
  132. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_three_way_partition.cuh +11 -36
  133. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_topk.cuh +0 -1
  134. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_transform.cuh +2 -27
  135. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_unique_by_key.cuh +14 -40
  136. cuda/cccl/headers/include/cub/grid/grid_even_share.cuh +3 -27
  137. cuda/cccl/headers/include/cub/grid/grid_mapping.cuh +3 -27
  138. cuda/cccl/headers/include/cub/grid/grid_queue.cuh +3 -27
  139. cuda/cccl/headers/include/cub/iterator/arg_index_input_iterator.cuh +3 -27
  140. cuda/cccl/headers/include/cub/iterator/cache_modified_input_iterator.cuh +3 -27
  141. cuda/cccl/headers/include/cub/iterator/cache_modified_output_iterator.cuh +3 -27
  142. cuda/cccl/headers/include/cub/iterator/tex_obj_input_iterator.cuh +3 -27
  143. cuda/cccl/headers/include/cub/thread/thread_load.cuh +3 -28
  144. cuda/cccl/headers/include/cub/thread/thread_operators.cuh +3 -27
  145. cuda/cccl/headers/include/cub/thread/thread_reduce.cuh +3 -26
  146. cuda/cccl/headers/include/cub/thread/thread_scan.cuh +3 -29
  147. cuda/cccl/headers/include/cub/thread/thread_search.cuh +3 -27
  148. cuda/cccl/headers/include/cub/thread/thread_simd.cuh +0 -2
  149. cuda/cccl/headers/include/cub/thread/thread_sort.cuh +2 -26
  150. cuda/cccl/headers/include/cub/thread/thread_store.cuh +3 -27
  151. cuda/cccl/headers/include/cub/util_allocator.cuh +3 -27
  152. cuda/cccl/headers/include/cub/util_arch.cuh +3 -29
  153. cuda/cccl/headers/include/cub/util_cpp_dialect.cuh +2 -26
  154. cuda/cccl/headers/include/cub/util_debug.cuh +3 -27
  155. cuda/cccl/headers/include/cub/util_device.cuh +18 -59
  156. cuda/cccl/headers/include/cub/util_macro.cuh +4 -28
  157. cuda/cccl/headers/include/cub/util_math.cuh +2 -28
  158. cuda/cccl/headers/include/cub/util_namespace.cuh +3 -28
  159. cuda/cccl/headers/include/cub/util_policy_wrapper_t.cuh +3 -27
  160. cuda/cccl/headers/include/cub/util_ptx.cuh +6 -30
  161. cuda/cccl/headers/include/cub/util_temporary_storage.cuh +3 -29
  162. cuda/cccl/headers/include/cub/util_type.cuh +5 -32
  163. cuda/cccl/headers/include/cub/util_vsmem.cuh +2 -28
  164. cuda/cccl/headers/include/cub/version.cuh +2 -26
  165. cuda/cccl/headers/include/cub/warp/specializations/warp_exchange_shfl.cuh +10 -35
  166. cuda/cccl/headers/include/cub/warp/specializations/warp_exchange_smem.cuh +5 -30
  167. cuda/cccl/headers/include/cub/warp/specializations/warp_reduce_shfl.cuh +15 -39
  168. cuda/cccl/headers/include/cub/warp/specializations/warp_reduce_smem.cuh +5 -35
  169. cuda/cccl/headers/include/cub/warp/specializations/warp_scan_shfl.cuh +22 -46
  170. cuda/cccl/headers/include/cub/warp/specializations/warp_scan_smem.cuh +3 -27
  171. cuda/cccl/headers/include/cub/warp/warp_exchange.cuh +2 -26
  172. cuda/cccl/headers/include/cub/warp/warp_load.cuh +4 -27
  173. cuda/cccl/headers/include/cub/warp/warp_merge_sort.cuh +2 -26
  174. cuda/cccl/headers/include/cub/warp/warp_reduce.cuh +3 -22
  175. cuda/cccl/headers/include/cub/warp/warp_scan.cuh +3 -27
  176. cuda/cccl/headers/include/cub/warp/warp_store.cuh +4 -27
  177. cuda/cccl/headers/include/cub/warp/warp_utils.cuh +0 -2
  178. cuda/cccl/headers/include/cuda/__barrier/barrier.h +1 -1
  179. cuda/cccl/headers/include/cuda/__barrier/barrier_arrive_tx.h +0 -1
  180. cuda/cccl/headers/include/cuda/__barrier/barrier_block_scope.h +277 -235
  181. cuda/cccl/headers/include/cuda/__barrier/barrier_expect_tx.h +0 -1
  182. cuda/cccl/headers/include/cuda/__driver/driver_api.h +13 -0
  183. cuda/cccl/headers/include/cuda/__execution/determinism.h +0 -2
  184. cuda/cccl/headers/include/cuda/__execution/output_ordering.h +0 -2
  185. cuda/cccl/headers/include/cuda/__functional/maximum.h +25 -7
  186. cuda/cccl/headers/include/cuda/__functional/minimum.h +25 -7
  187. cuda/cccl/headers/include/cuda/__functional/minimum_maximum_common.h +52 -0
  188. cuda/cccl/headers/include/cuda/__functional/proclaim_return_type.h +0 -2
  189. cuda/cccl/headers/include/cuda/__iterator/counting_iterator.h +13 -4
  190. cuda/cccl/headers/include/cuda/__iterator/zip_function.h +4 -2
  191. cuda/cccl/headers/include/cuda/__mdspan/host_device_accessor.h +0 -1
  192. cuda/cccl/headers/include/cuda/__memcpy_async/cp_async_bulk_shared_global.h +28 -7
  193. cuda/cccl/headers/include/cuda/__memcpy_async/dispatch_memcpy_async.h +1 -1
  194. cuda/cccl/headers/include/cuda/__memcpy_async/elect_one.h +52 -0
  195. cuda/cccl/headers/include/cuda/__memcpy_async/memcpy_async_tx.h +2 -3
  196. cuda/cccl/headers/include/cuda/__memcpy_async/memcpy_completion.h +1 -7
  197. cuda/cccl/headers/include/cuda/__memcpy_async/try_get_barrier_handle.h +0 -1
  198. cuda/cccl/headers/include/cuda/__memory/get_device_address.h +1 -1
  199. cuda/cccl/headers/include/cuda/__memory/ranges_overlap.h +126 -0
  200. cuda/cccl/headers/include/cuda/__memory_resource/any_resource.h +898 -0
  201. cuda/cccl/headers/include/cuda/__memory_resource/device_memory_pool.h +149 -0
  202. cuda/cccl/headers/include/cuda/__memory_resource/get_property.h +3 -3
  203. cuda/cccl/headers/include/cuda/__memory_resource/legacy_managed_memory_resource.h +148 -0
  204. cuda/cccl/headers/include/cuda/__memory_resource/legacy_pinned_memory_resource.h +139 -0
  205. cuda/cccl/headers/include/cuda/__memory_resource/managed_memory_pool.h +146 -0
  206. cuda/cccl/headers/include/cuda/__memory_resource/memory_resource_base.h +578 -0
  207. cuda/cccl/headers/include/cuda/__memory_resource/pinned_memory_pool.h +188 -0
  208. cuda/cccl/headers/include/cuda/__memory_resource/properties.h +3 -3
  209. cuda/cccl/headers/include/cuda/__memory_resource/resource.h +37 -3
  210. cuda/cccl/headers/include/cuda/__numeric/add_overflow.h +13 -3
  211. cuda/cccl/headers/include/cuda/__numeric/div_overflow.h +150 -0
  212. cuda/cccl/headers/include/cuda/__numeric/overflow_cast.h +2 -2
  213. cuda/cccl/headers/include/cuda/__numeric/sub_overflow.h +344 -0
  214. cuda/cccl/headers/include/cuda/__nvtx/nvtx3.h +0 -6
  215. cuda/cccl/headers/include/cuda/__ptx/instructions/shfl_sync.h +1 -1
  216. cuda/cccl/headers/include/cuda/__ptx/pragmas/enable_smem_spilling.h +47 -0
  217. cuda/cccl/headers/include/cuda/{std/__cuda → __runtime}/api_wrapper.h +3 -3
  218. cuda/cccl/headers/include/cuda/__stream/get_stream.h +0 -1
  219. cuda/cccl/headers/include/cuda/{__fwd/barrier_native_handle.h → __stream/internal_streams.h} +17 -15
  220. cuda/cccl/headers/include/cuda/__utility/__basic_any/basic_any_ptr.h +2 -2
  221. cuda/cccl/headers/include/cuda/__utility/__basic_any/basic_any_value.h +1 -0
  222. cuda/cccl/headers/include/cuda/__utility/__basic_any/semiregular.h +1 -0
  223. cuda/cccl/headers/include/cuda/__utility/__basic_any/virtcall.h +2 -1
  224. cuda/cccl/headers/include/cuda/barrier +42 -16
  225. cuda/cccl/headers/include/cuda/memory +1 -0
  226. cuda/cccl/headers/include/cuda/memory_resource +6 -1
  227. cuda/cccl/headers/include/cuda/numeric +2 -0
  228. cuda/cccl/headers/include/cuda/pipeline +3 -2
  229. cuda/cccl/headers/include/cuda/ptx +1 -0
  230. cuda/cccl/headers/include/cuda/std/__algorithm/unique_copy.h +0 -2
  231. cuda/cccl/headers/include/cuda/std/__atomic/api/reference.h +1 -1
  232. cuda/cccl/headers/include/cuda/std/__atomic/functions/cuda_ptx_derived.h +115 -58
  233. cuda/cccl/headers/include/cuda/std/__atomic/functions/cuda_ptx_generated.h +844 -378
  234. cuda/cccl/headers/include/cuda/std/__atomic/functions/cuda_ptx_generated_helper.h +12 -5
  235. cuda/cccl/headers/include/cuda/std/__atomic/functions/host.h +31 -0
  236. cuda/cccl/headers/include/cuda/std/__atomic/types/small.h +10 -0
  237. cuda/cccl/headers/include/cuda/std/__atomic/types.h +2 -3
  238. cuda/cccl/headers/include/cuda/std/__bit/byteswap.h +37 -13
  239. cuda/cccl/headers/include/cuda/std/__cccl/builtin.h +0 -28
  240. cuda/cccl/headers/include/cuda/std/__cccl/dialect.h +7 -0
  241. cuda/cccl/headers/include/cuda/std/__cccl/epilogue.h +10 -0
  242. cuda/cccl/headers/include/cuda/std/__cccl/exceptions.h +2 -45
  243. cuda/cccl/headers/include/cuda/std/__cccl/is_non_narrowing_convertible.h +0 -2
  244. cuda/cccl/headers/include/cuda/std/__cccl/prologue.h +8 -0
  245. cuda/cccl/headers/include/cuda/std/__chrono/calendar.h +0 -2
  246. cuda/cccl/headers/include/cuda/std/__chrono/day.h +0 -2
  247. cuda/cccl/headers/include/cuda/std/__chrono/duration.h +13 -17
  248. cuda/cccl/headers/include/cuda/std/__chrono/file_clock.h +0 -2
  249. cuda/cccl/headers/include/cuda/std/__chrono/high_resolution_clock.h +0 -2
  250. cuda/cccl/headers/include/cuda/std/__chrono/month.h +0 -2
  251. cuda/cccl/headers/include/cuda/std/__chrono/steady_clock.h +0 -2
  252. cuda/cccl/headers/include/cuda/std/__chrono/system_clock.h +0 -2
  253. cuda/cccl/headers/include/cuda/std/__chrono/time_point.h +5 -8
  254. cuda/cccl/headers/include/cuda/std/__chrono/year.h +0 -2
  255. cuda/cccl/headers/include/cuda/std/__cmath/error_functions.h +4 -0
  256. cuda/cccl/headers/include/cuda/std/__cmath/exponential_functions.h +2 -3
  257. cuda/cccl/headers/include/cuda/std/__cmath/fdim.h +4 -0
  258. cuda/cccl/headers/include/cuda/std/__cmath/fma.h +4 -0
  259. cuda/cccl/headers/include/cuda/std/__cmath/fpclassify.h +2 -3
  260. cuda/cccl/headers/include/cuda/std/__cmath/gamma.h +2 -3
  261. cuda/cccl/headers/include/cuda/std/__cmath/hyperbolic_functions.h +2 -3
  262. cuda/cccl/headers/include/cuda/std/__cmath/hypot.h +2 -3
  263. cuda/cccl/headers/include/cuda/std/__cmath/inverse_hyperbolic_functions.h +2 -3
  264. cuda/cccl/headers/include/cuda/std/__cmath/inverse_trigonometric_functions.h +2 -3
  265. cuda/cccl/headers/include/cuda/std/__cmath/isfinite.h +2 -3
  266. cuda/cccl/headers/include/cuda/std/__cmath/isinf.h +2 -3
  267. cuda/cccl/headers/include/cuda/std/__cmath/isnan.h +2 -3
  268. cuda/cccl/headers/include/cuda/std/__cmath/logarithms.h +2 -3
  269. cuda/cccl/headers/include/cuda/std/__cmath/min_max.h +2 -2
  270. cuda/cccl/headers/include/cuda/std/__cmath/remainder.h +4 -0
  271. cuda/cccl/headers/include/cuda/std/__cmath/roots.h +2 -3
  272. cuda/cccl/headers/include/cuda/std/__cmath/rounding_functions.h +2 -3
  273. cuda/cccl/headers/include/cuda/std/__cmath/traits.h +4 -0
  274. cuda/cccl/headers/include/cuda/std/__cmath/trigonometric_functions.h +2 -3
  275. cuda/cccl/headers/include/cuda/std/__complex/complex.h +0 -6
  276. cuda/cccl/headers/include/cuda/std/__complex/exponential_functions.h +2 -2
  277. cuda/cccl/headers/include/cuda/std/__concepts/concept_macros.h +27 -1
  278. cuda/cccl/headers/include/cuda/std/__concepts/equality_comparable.h +2 -4
  279. cuda/cccl/headers/include/cuda/std/__exception/cuda_error.h +15 -36
  280. cuda/cccl/headers/include/cuda/std/__exception/exception_macros.h +93 -0
  281. cuda/cccl/headers/include/cuda/std/{detail/libcxx/include/stdexcept → __exception/throw_error.h} +3 -3
  282. cuda/cccl/headers/include/cuda/std/__expected/expected.h +28 -43
  283. cuda/cccl/headers/include/cuda/std/__expected/unexpected.h +2 -10
  284. cuda/cccl/headers/include/cuda/std/__format/format_arg_store.h +2 -2
  285. cuda/cccl/headers/include/cuda/std/__functional/bind.h +6 -6
  286. cuda/cccl/headers/include/cuda/std/__functional/function.h +2 -6
  287. cuda/cccl/headers/include/cuda/std/__functional/invoke.h +5 -5
  288. cuda/cccl/headers/include/cuda/std/__fwd/allocator.h +5 -0
  289. cuda/cccl/headers/include/cuda/std/__fwd/array.h +2 -2
  290. cuda/cccl/headers/include/cuda/std/__fwd/char_traits.h +12 -0
  291. cuda/cccl/headers/include/cuda/std/__fwd/expected.h +46 -0
  292. cuda/cccl/headers/include/cuda/std/__fwd/get.h +21 -22
  293. cuda/cccl/headers/include/cuda/std/{detail/libcxx/include/iosfwd → __fwd/ios.h} +5 -10
  294. cuda/cccl/headers/include/cuda/std/__fwd/mdspan.h +19 -10
  295. cuda/cccl/headers/include/cuda/std/__fwd/optional.h +2 -2
  296. cuda/cccl/headers/include/cuda/std/__fwd/reference_wrapper.h +5 -0
  297. cuda/cccl/headers/include/cuda/std/__fwd/span.h +2 -2
  298. cuda/cccl/headers/include/cuda/std/__fwd/string.h +7 -0
  299. cuda/cccl/headers/include/cuda/std/__fwd/string_view.h +18 -0
  300. cuda/cccl/headers/include/cuda/std/__fwd/tuple.h +3 -0
  301. cuda/cccl/headers/include/cuda/std/__fwd/unexpected.h +40 -0
  302. cuda/cccl/headers/include/cuda/std/{__type_traits/is_reference_wrapper.h → __fwd/variant.h} +16 -15
  303. cuda/cccl/headers/include/cuda/std/__internal/features.h +14 -0
  304. cuda/cccl/headers/include/cuda/std/__iterator/istream_iterator.h +1 -1
  305. cuda/cccl/headers/include/cuda/std/__iterator/istreambuf_iterator.h +1 -1
  306. cuda/cccl/headers/include/cuda/std/__iterator/iter_swap.h +58 -40
  307. cuda/cccl/headers/include/cuda/std/__iterator/ostream_iterator.h +1 -1
  308. cuda/cccl/headers/include/cuda/std/__iterator/ostreambuf_iterator.h +1 -1
  309. cuda/cccl/headers/include/cuda/std/__iterator/reverse_iterator.h +0 -5
  310. cuda/cccl/headers/include/cuda/std/__limits/numeric_limits.h +4 -18
  311. cuda/cccl/headers/include/cuda/std/__linalg/conj_if_needed.h +1 -2
  312. cuda/cccl/headers/include/cuda/std/__linalg/conjugate_transposed.h +0 -2
  313. cuda/cccl/headers/include/cuda/std/__linalg/conjugated.h +0 -2
  314. cuda/cccl/headers/include/cuda/std/__linalg/scaled.h +0 -4
  315. cuda/cccl/headers/include/cuda/std/__linalg/transposed.h +0 -5
  316. cuda/cccl/headers/include/cuda/std/__mdspan/concepts.h +3 -10
  317. cuda/cccl/headers/include/cuda/std/__mdspan/extents.h +4 -15
  318. cuda/cccl/headers/include/cuda/std/__mdspan/layout_left.h +4 -4
  319. cuda/cccl/headers/include/cuda/std/__mdspan/layout_right.h +4 -4
  320. cuda/cccl/headers/include/cuda/std/__mdspan/layout_stride.h +2 -4
  321. cuda/cccl/headers/include/cuda/std/__mdspan/mdspan.h +3 -3
  322. cuda/cccl/headers/include/cuda/std/__mdspan/submdspan_helper.h +1 -1
  323. cuda/cccl/headers/include/cuda/std/__memory/allocator_arg_t.h +1 -0
  324. cuda/cccl/headers/include/cuda/std/__memory/allocator_traits.h +6 -12
  325. cuda/cccl/headers/include/cuda/std/__memory/construct_at.h +1 -5
  326. cuda/cccl/headers/include/cuda/std/__memory/is_sufficiently_aligned.h +7 -2
  327. cuda/cccl/headers/include/cuda/std/__memory/uninitialized_algorithms.h +1 -0
  328. cuda/cccl/headers/include/cuda/std/__memory/uses_allocator.h +5 -0
  329. cuda/cccl/headers/include/cuda/std/__new/allocate.h +5 -0
  330. cuda/cccl/headers/include/cuda/{__barrier/barrier_native_handle.h → std/__new/device_new.h} +9 -24
  331. cuda/cccl/headers/include/cuda/std/__new_ +1 -0
  332. cuda/cccl/headers/include/cuda/std/__optional/optional.h +5 -4
  333. cuda/cccl/headers/include/cuda/std/__optional/optional_ref.h +4 -4
  334. cuda/cccl/headers/include/cuda/std/__random/linear_congruential_engine.h +1 -1
  335. cuda/cccl/headers/include/cuda/std/__random/philox_engine.h +562 -0
  336. cuda/cccl/headers/include/cuda/std/__random/seed_seq.h +204 -0
  337. cuda/cccl/headers/include/cuda/std/__random_ +2 -0
  338. cuda/cccl/headers/include/cuda/std/__ranges/concepts.h +7 -19
  339. cuda/cccl/headers/include/cuda/std/__ranges/movable_box.h +2 -4
  340. cuda/cccl/headers/include/cuda/std/__ranges/owning_view.h +5 -4
  341. cuda/cccl/headers/include/cuda/std/__ranges/repeat_view.h +1 -1
  342. cuda/cccl/headers/include/cuda/std/__string/string_view.h +5 -5
  343. cuda/cccl/headers/include/cuda/std/__tuple_dir/apply.h +82 -0
  344. cuda/cccl/headers/include/cuda/std/__tuple_dir/get.h +122 -0
  345. cuda/cccl/headers/include/cuda/std/__tuple_dir/sfinae_helpers.h +0 -160
  346. cuda/cccl/headers/include/cuda/std/__tuple_dir/structured_bindings.h +123 -129
  347. cuda/cccl/headers/include/cuda/std/__tuple_dir/tie.h +55 -0
  348. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple.h +457 -0
  349. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple_cat.h +158 -0
  350. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple_constraints.h +286 -0
  351. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple_element.h +7 -0
  352. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple_leaf.h +452 -0
  353. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple_like.h +1 -2
  354. cuda/cccl/headers/include/cuda/std/__type_traits/is_comparable.h +78 -0
  355. cuda/cccl/headers/include/cuda/std/__type_traits/is_convertible.h +1 -1
  356. cuda/cccl/headers/include/cuda/std/__type_traits/is_fully_bounded_array.h +47 -0
  357. cuda/cccl/headers/include/cuda/std/__type_traits/is_swappable.h +0 -2
  358. cuda/cccl/headers/include/cuda/std/__utility/in_place.h +4 -24
  359. cuda/cccl/headers/include/cuda/std/__utility/integer_sequence.h +0 -2
  360. cuda/cccl/headers/include/cuda/std/__utility/pair.h +20 -20
  361. cuda/cccl/headers/include/cuda/std/__utility/rel_ops.h +0 -2
  362. cuda/cccl/headers/include/cuda/std/__variant/bad_variant_access.h +74 -0
  363. cuda/cccl/headers/include/cuda/std/__variant/comparison.h +207 -0
  364. cuda/cccl/headers/include/cuda/std/__variant/get.h +192 -0
  365. cuda/cccl/headers/include/cuda/std/__variant/hash.h +82 -0
  366. cuda/cccl/headers/include/cuda/std/__variant/sfinae_helpers.h +89 -0
  367. cuda/cccl/headers/include/cuda/std/__variant/variant.h +250 -0
  368. cuda/cccl/headers/include/cuda/std/__variant/variant_access.h +70 -0
  369. cuda/cccl/headers/include/cuda/std/__variant/variant_base.h +683 -0
  370. cuda/cccl/headers/include/cuda/std/__variant/variant_constraints.h +135 -0
  371. cuda/cccl/headers/include/cuda/std/__variant/variant_match.h +126 -0
  372. cuda/cccl/headers/include/cuda/std/__variant/variant_traits.h +184 -0
  373. cuda/cccl/headers/include/cuda/std/__variant/variant_visit.h +225 -0
  374. cuda/cccl/headers/include/cuda/std/__variant/visit.h +148 -0
  375. cuda/cccl/headers/include/cuda/std/array +1 -1
  376. cuda/cccl/headers/include/cuda/std/atomic +1 -1
  377. cuda/cccl/headers/include/cuda/std/bitset +2 -10
  378. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/__config +6 -6
  379. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/algorithm +1 -4
  380. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/chrono +3 -6
  381. cuda/cccl/headers/include/cuda/std/functional +1 -1
  382. cuda/cccl/headers/include/cuda/std/initializer_list +8 -0
  383. cuda/cccl/headers/include/cuda/std/inplace_vector +6 -5
  384. cuda/cccl/headers/include/cuda/std/iterator +1 -1
  385. cuda/cccl/headers/include/cuda/std/numbers +0 -2
  386. cuda/cccl/headers/include/cuda/std/ratio +2 -2
  387. cuda/cccl/headers/include/cuda/std/span +2 -2
  388. cuda/cccl/headers/include/cuda/std/string_view +24 -42
  389. cuda/cccl/headers/include/cuda/std/tuple +18 -1
  390. cuda/cccl/headers/include/cuda/std/type_traits +0 -1
  391. cuda/cccl/headers/include/cuda/std/variant +8 -1
  392. cuda/cccl/headers/include/nv/target +2 -6
  393. cuda/cccl/headers/include/thrust/detail/adjacent_difference.inl +15 -2
  394. cuda/cccl/headers/include/thrust/detail/allocator/allocator_traits.h +0 -2
  395. cuda/cccl/headers/include/thrust/detail/allocator/copy_construct_range.h +0 -1
  396. cuda/cccl/headers/include/thrust/detail/allocator/destroy_range.h +0 -1
  397. cuda/cccl/headers/include/thrust/detail/allocator/fill_construct_range.h +0 -2
  398. cuda/cccl/headers/include/thrust/detail/allocator/malloc_allocator.h +0 -2
  399. cuda/cccl/headers/include/thrust/detail/allocator/no_throw_allocator.h +0 -2
  400. cuda/cccl/headers/include/thrust/detail/allocator/tagged_allocator.h +0 -2
  401. cuda/cccl/headers/include/thrust/detail/allocator/temporary_allocator.h +0 -2
  402. cuda/cccl/headers/include/thrust/detail/allocator_aware_execution_policy.h +0 -4
  403. cuda/cccl/headers/include/thrust/detail/binary_search.inl +14 -2
  404. cuda/cccl/headers/include/thrust/detail/complex/arithmetic.h +2 -7
  405. cuda/cccl/headers/include/thrust/detail/complex/c99math.h +2 -8
  406. cuda/cccl/headers/include/thrust/detail/complex/catrig.h +2 -8
  407. cuda/cccl/headers/include/thrust/detail/complex/catrigf.h +2 -8
  408. cuda/cccl/headers/include/thrust/detail/complex/ccosh.h +2 -8
  409. cuda/cccl/headers/include/thrust/detail/complex/ccoshf.h +2 -8
  410. cuda/cccl/headers/include/thrust/detail/complex/cexp.h +2 -7
  411. cuda/cccl/headers/include/thrust/detail/complex/cexpf.h +2 -8
  412. cuda/cccl/headers/include/thrust/detail/complex/clog.h +2 -8
  413. cuda/cccl/headers/include/thrust/detail/complex/clogf.h +2 -8
  414. cuda/cccl/headers/include/thrust/detail/complex/cproj.h +2 -7
  415. cuda/cccl/headers/include/thrust/detail/complex/csinh.h +2 -8
  416. cuda/cccl/headers/include/thrust/detail/complex/csinhf.h +2 -8
  417. cuda/cccl/headers/include/thrust/detail/complex/csqrt.h +2 -8
  418. cuda/cccl/headers/include/thrust/detail/complex/csqrtf.h +2 -8
  419. cuda/cccl/headers/include/thrust/detail/complex/ctanh.h +2 -8
  420. cuda/cccl/headers/include/thrust/detail/complex/ctanhf.h +2 -8
  421. cuda/cccl/headers/include/thrust/detail/complex/math_private.h +2 -8
  422. cuda/cccl/headers/include/thrust/detail/config/device_system.h +2 -0
  423. cuda/cccl/headers/include/thrust/detail/config/host_system.h +2 -0
  424. cuda/cccl/headers/include/thrust/detail/config/namespace.h +0 -1
  425. cuda/cccl/headers/include/thrust/detail/contiguous_storage.h +0 -2
  426. cuda/cccl/headers/include/thrust/detail/contiguous_storage.inl +0 -2
  427. cuda/cccl/headers/include/thrust/detail/copy.h +0 -2
  428. cuda/cccl/headers/include/thrust/detail/copy.inl +14 -4
  429. cuda/cccl/headers/include/thrust/detail/copy_if.inl +14 -2
  430. cuda/cccl/headers/include/thrust/detail/count.inl +14 -2
  431. cuda/cccl/headers/include/thrust/detail/equal.inl +14 -2
  432. cuda/cccl/headers/include/thrust/detail/execute_with_allocator.h +4 -5
  433. cuda/cccl/headers/include/thrust/detail/extrema.inl +14 -2
  434. cuda/cccl/headers/include/thrust/detail/fill.inl +14 -2
  435. cuda/cccl/headers/include/thrust/detail/find.inl +14 -2
  436. cuda/cccl/headers/include/thrust/detail/for_each.inl +14 -2
  437. cuda/cccl/headers/include/thrust/detail/functional/actor.h +2 -5
  438. cuda/cccl/headers/include/thrust/detail/functional/operators.h +2 -5
  439. cuda/cccl/headers/include/thrust/detail/gather.inl +14 -2
  440. cuda/cccl/headers/include/thrust/detail/generate.inl +14 -2
  441. cuda/cccl/headers/include/thrust/detail/get_iterator_value.h +0 -2
  442. cuda/cccl/headers/include/thrust/detail/inner_product.inl +14 -2
  443. cuda/cccl/headers/include/thrust/detail/internal_functional.h +1 -0
  444. cuda/cccl/headers/include/thrust/detail/logical.inl +14 -2
  445. cuda/cccl/headers/include/thrust/detail/malloc_and_free.h +13 -1
  446. cuda/cccl/headers/include/thrust/detail/merge.inl +14 -2
  447. cuda/cccl/headers/include/thrust/detail/mismatch.inl +14 -2
  448. cuda/cccl/headers/include/thrust/detail/overlapped_copy.h +0 -4
  449. cuda/cccl/headers/include/thrust/detail/partition.inl +14 -2
  450. cuda/cccl/headers/include/thrust/detail/random_bijection.h +0 -2
  451. cuda/cccl/headers/include/thrust/detail/range/head_flags.h +0 -2
  452. cuda/cccl/headers/include/thrust/detail/range/tail_flags.h +0 -2
  453. cuda/cccl/headers/include/thrust/detail/raw_reference_cast.h +0 -6
  454. cuda/cccl/headers/include/thrust/detail/reduce.inl +21 -3
  455. cuda/cccl/headers/include/thrust/detail/reference.h +27 -3
  456. cuda/cccl/headers/include/thrust/detail/remove.inl +14 -2
  457. cuda/cccl/headers/include/thrust/detail/replace.inl +14 -2
  458. cuda/cccl/headers/include/thrust/detail/reverse.inl +14 -2
  459. cuda/cccl/headers/include/thrust/detail/scan.inl +21 -3
  460. cuda/cccl/headers/include/thrust/detail/scatter.inl +14 -2
  461. cuda/cccl/headers/include/thrust/detail/sequence.inl +13 -1
  462. cuda/cccl/headers/include/thrust/detail/set_operations.inl +13 -1
  463. cuda/cccl/headers/include/thrust/detail/sort.inl +13 -1
  464. cuda/cccl/headers/include/thrust/detail/static_assert.h +0 -2
  465. cuda/cccl/headers/include/thrust/detail/static_map.h +0 -3
  466. cuda/cccl/headers/include/thrust/detail/swap_ranges.inl +13 -1
  467. cuda/cccl/headers/include/thrust/detail/tabulate.inl +14 -2
  468. cuda/cccl/headers/include/thrust/detail/temporary_array.h +0 -4
  469. cuda/cccl/headers/include/thrust/detail/temporary_array.inl +0 -1
  470. cuda/cccl/headers/include/thrust/detail/temporary_buffer.h +14 -3
  471. cuda/cccl/headers/include/thrust/detail/transform_reduce.inl +13 -1
  472. cuda/cccl/headers/include/thrust/detail/transform_scan.inl +13 -1
  473. cuda/cccl/headers/include/thrust/detail/trivial_sequence.h +0 -2
  474. cuda/cccl/headers/include/thrust/detail/tuple_meta_transform.h +0 -2
  475. cuda/cccl/headers/include/thrust/detail/type_traits/is_call_possible.h +2 -7
  476. cuda/cccl/headers/include/thrust/detail/type_traits/is_commutative.h +0 -2
  477. cuda/cccl/headers/include/thrust/detail/type_traits/is_thrust_pointer.h +0 -4
  478. cuda/cccl/headers/include/thrust/detail/type_traits/pointer_traits.h +0 -4
  479. cuda/cccl/headers/include/thrust/detail/uninitialized_copy.inl +14 -2
  480. cuda/cccl/headers/include/thrust/detail/uninitialized_fill.inl +14 -2
  481. cuda/cccl/headers/include/thrust/detail/unique.inl +21 -3
  482. cuda/cccl/headers/include/thrust/detail/vector_base.h +0 -2
  483. cuda/cccl/headers/include/thrust/detail/vector_base.inl +0 -2
  484. cuda/cccl/headers/include/thrust/execution_policy.h +10 -9
  485. cuda/cccl/headers/include/thrust/functional.h +0 -2
  486. cuda/cccl/headers/include/thrust/iterator/detail/device_system_tag.h +9 -4
  487. cuda/cccl/headers/include/thrust/iterator/detail/host_system_tag.h +8 -4
  488. cuda/cccl/headers/include/thrust/iterator/detail/iterator_adaptor_base.h +0 -1
  489. cuda/cccl/headers/include/thrust/iterator/detail/iterator_category_with_system_and_traversal.h +0 -1
  490. cuda/cccl/headers/include/thrust/iterator/detail/iterator_facade_category.h +0 -1
  491. cuda/cccl/headers/include/thrust/iterator/detail/minimum_system.h +0 -1
  492. cuda/cccl/headers/include/thrust/iterator/detail/tagged_iterator.h +0 -1
  493. cuda/cccl/headers/include/thrust/iterator/detail/tuple_of_iterator_references.h +2 -6
  494. cuda/cccl/headers/include/thrust/iterator/transform_input_output_iterator.h +0 -1
  495. cuda/cccl/headers/include/thrust/iterator/transform_iterator.h +0 -2
  496. cuda/cccl/headers/include/thrust/mr/allocator.h +0 -2
  497. cuda/cccl/headers/include/thrust/mr/device_memory_resource.h +9 -4
  498. cuda/cccl/headers/include/thrust/mr/disjoint_pool.h +10 -10
  499. cuda/cccl/headers/include/thrust/mr/disjoint_sync_pool.h +0 -2
  500. cuda/cccl/headers/include/thrust/mr/disjoint_tls_pool.h +0 -2
  501. cuda/cccl/headers/include/thrust/mr/fancy_pointer_resource.h +0 -2
  502. cuda/cccl/headers/include/thrust/mr/host_memory_resource.h +8 -4
  503. cuda/cccl/headers/include/thrust/mr/memory_resource.h +0 -2
  504. cuda/cccl/headers/include/thrust/mr/new.h +0 -2
  505. cuda/cccl/headers/include/thrust/mr/polymorphic_adaptor.h +0 -2
  506. cuda/cccl/headers/include/thrust/mr/pool.h +10 -10
  507. cuda/cccl/headers/include/thrust/mr/pool_options.h +4 -6
  508. cuda/cccl/headers/include/thrust/mr/sync_pool.h +0 -2
  509. cuda/cccl/headers/include/thrust/mr/tls_pool.h +0 -2
  510. cuda/cccl/headers/include/thrust/mr/validator.h +0 -2
  511. cuda/cccl/headers/include/thrust/per_device_resource.h +13 -1
  512. cuda/cccl/headers/include/thrust/random/detail/discard_block_engine.inl +0 -2
  513. cuda/cccl/headers/include/thrust/random/detail/linear_congruential_engine.inl +0 -2
  514. cuda/cccl/headers/include/thrust/random/detail/linear_congruential_engine_discard.h +2 -9
  515. cuda/cccl/headers/include/thrust/random/detail/linear_feedback_shift_engine.inl +0 -2
  516. cuda/cccl/headers/include/thrust/random/detail/linear_feedback_shift_engine_wordmask.h +2 -9
  517. cuda/cccl/headers/include/thrust/random/detail/mod.h +2 -9
  518. cuda/cccl/headers/include/thrust/random/detail/normal_distribution.inl +0 -2
  519. cuda/cccl/headers/include/thrust/random/detail/normal_distribution_base.h +2 -7
  520. cuda/cccl/headers/include/thrust/random/detail/random_core_access.h +2 -9
  521. cuda/cccl/headers/include/thrust/random/detail/subtract_with_carry_engine.inl +0 -2
  522. cuda/cccl/headers/include/thrust/random/detail/uniform_int_distribution.inl +0 -2
  523. cuda/cccl/headers/include/thrust/random/detail/uniform_real_distribution.inl +0 -2
  524. cuda/cccl/headers/include/thrust/random/detail/xor_combine_engine.inl +0 -2
  525. cuda/cccl/headers/include/thrust/random/discard_block_engine.h +0 -2
  526. cuda/cccl/headers/include/thrust/random/linear_congruential_engine.h +0 -2
  527. cuda/cccl/headers/include/thrust/random/linear_feedback_shift_engine.h +0 -2
  528. cuda/cccl/headers/include/thrust/random/normal_distribution.h +0 -2
  529. cuda/cccl/headers/include/thrust/random/subtract_with_carry_engine.h +0 -2
  530. cuda/cccl/headers/include/thrust/random/uniform_int_distribution.h +0 -2
  531. cuda/cccl/headers/include/thrust/random/uniform_real_distribution.h +0 -2
  532. cuda/cccl/headers/include/thrust/random/xor_combine_engine.h +0 -2
  533. cuda/cccl/headers/include/thrust/random.h +0 -2
  534. cuda/cccl/headers/include/thrust/system/cpp/detail/execution_policy.h +15 -11
  535. cuda/cccl/headers/include/thrust/system/cpp/detail/memory.inl +2 -7
  536. cuda/cccl/headers/include/thrust/system/cpp/memory.h +0 -1
  537. cuda/cccl/headers/include/thrust/system/cpp/memory_resource.h +0 -2
  538. cuda/cccl/headers/include/thrust/system/cpp/pointer.h +0 -2
  539. cuda/cccl/headers/include/thrust/system/cpp/vector.h +0 -1
  540. cuda/cccl/headers/include/thrust/system/cuda/detail/adjacent_difference.h +0 -4
  541. cuda/cccl/headers/include/thrust/system/cuda/detail/copy.h +0 -1
  542. cuda/cccl/headers/include/thrust/system/cuda/detail/copy_if.h +0 -4
  543. cuda/cccl/headers/include/thrust/system/cuda/detail/core/agent_launcher.h +2 -9
  544. cuda/cccl/headers/include/thrust/system/cuda/detail/core/triple_chevron_launch.h +4 -32
  545. cuda/cccl/headers/include/thrust/system/cuda/detail/core/util.h +2 -9
  546. cuda/cccl/headers/include/thrust/system/cuda/detail/count.h +0 -2
  547. cuda/cccl/headers/include/thrust/system/cuda/detail/cross_system.h +0 -2
  548. cuda/cccl/headers/include/thrust/system/cuda/detail/dispatch.h +23 -2
  549. cuda/cccl/headers/include/thrust/system/cuda/detail/equal.h +0 -2
  550. cuda/cccl/headers/include/thrust/system/cuda/detail/error.inl +2 -11
  551. cuda/cccl/headers/include/thrust/system/cuda/detail/execution_policy.h +2 -0
  552. cuda/cccl/headers/include/thrust/system/cuda/detail/extrema.h +0 -4
  553. cuda/cccl/headers/include/thrust/system/cuda/detail/fill.h +0 -1
  554. cuda/cccl/headers/include/thrust/system/cuda/detail/find.h +0 -5
  555. cuda/cccl/headers/include/thrust/system/cuda/detail/for_each.h +0 -1
  556. cuda/cccl/headers/include/thrust/system/cuda/detail/gather.h +0 -2
  557. cuda/cccl/headers/include/thrust/system/cuda/detail/generate.h +0 -2
  558. cuda/cccl/headers/include/thrust/system/cuda/detail/iter_swap.h +0 -1
  559. cuda/cccl/headers/include/thrust/system/cuda/detail/make_unsigned_special.h +2 -8
  560. cuda/cccl/headers/include/thrust/system/cuda/detail/malloc_and_free.h +0 -2
  561. cuda/cccl/headers/include/thrust/system/cuda/detail/memory.inl +0 -2
  562. cuda/cccl/headers/include/thrust/system/cuda/detail/merge.h +2 -26
  563. cuda/cccl/headers/include/thrust/system/cuda/detail/mismatch.h +7 -142
  564. cuda/cccl/headers/include/thrust/system/cuda/detail/parallel_for.h +0 -2
  565. cuda/cccl/headers/include/thrust/system/cuda/detail/partition.h +0 -4
  566. cuda/cccl/headers/include/thrust/system/cuda/detail/per_device_resource.h +0 -2
  567. cuda/cccl/headers/include/thrust/system/cuda/detail/reduce.h +0 -5
  568. cuda/cccl/headers/include/thrust/system/cuda/detail/reduce_by_key.h +0 -4
  569. cuda/cccl/headers/include/thrust/system/cuda/detail/remove.h +0 -2
  570. cuda/cccl/headers/include/thrust/system/cuda/detail/replace.h +0 -1
  571. cuda/cccl/headers/include/thrust/system/cuda/detail/reverse.h +0 -4
  572. cuda/cccl/headers/include/thrust/system/cuda/detail/scan.h +0 -4
  573. cuda/cccl/headers/include/thrust/system/cuda/detail/scan_by_key.h +0 -3
  574. cuda/cccl/headers/include/thrust/system/cuda/detail/scatter.h +0 -2
  575. cuda/cccl/headers/include/thrust/system/cuda/detail/set_operations.h +3 -5
  576. cuda/cccl/headers/include/thrust/system/cuda/detail/sort.h +8 -10
  577. cuda/cccl/headers/include/thrust/system/cuda/detail/temporary_buffer.h +0 -2
  578. cuda/cccl/headers/include/thrust/system/cuda/detail/transform.h +0 -1
  579. cuda/cccl/headers/include/thrust/system/cuda/detail/transform_reduce.h +0 -4
  580. cuda/cccl/headers/include/thrust/system/cuda/detail/transform_scan.h +0 -2
  581. cuda/cccl/headers/include/thrust/system/cuda/detail/uninitialized_copy.h +1 -7
  582. cuda/cccl/headers/include/thrust/system/cuda/detail/uninitialized_fill.h +2 -7
  583. cuda/cccl/headers/include/thrust/system/cuda/detail/unique.h +0 -3
  584. cuda/cccl/headers/include/thrust/system/cuda/detail/unique_by_key.h +0 -4
  585. cuda/cccl/headers/include/thrust/system/cuda/error.h +2 -11
  586. cuda/cccl/headers/include/thrust/system/cuda/memory.h +2 -6
  587. cuda/cccl/headers/include/thrust/system/cuda/memory_resource.h +2 -9
  588. cuda/cccl/headers/include/thrust/system/cuda/pointer.h +2 -7
  589. cuda/cccl/headers/include/thrust/system/cuda/vector.h +2 -6
  590. cuda/cccl/headers/include/thrust/system/detail/bad_alloc.h +0 -2
  591. cuda/cccl/headers/include/thrust/system/detail/errno.h +0 -2
  592. cuda/cccl/headers/include/thrust/system/detail/error_category.inl +0 -4
  593. cuda/cccl/headers/include/thrust/system/detail/error_code.inl +0 -2
  594. cuda/cccl/headers/include/thrust/system/detail/error_condition.inl +0 -2
  595. cuda/cccl/headers/include/thrust/system/detail/generic/adjacent_difference.h +0 -2
  596. cuda/cccl/headers/include/thrust/system/detail/generic/adjacent_difference.inl +0 -2
  597. cuda/cccl/headers/include/thrust/system/detail/generic/binary_search.h +0 -2
  598. cuda/cccl/headers/include/thrust/system/detail/generic/binary_search.inl +0 -3
  599. cuda/cccl/headers/include/thrust/system/detail/generic/copy.h +0 -2
  600. cuda/cccl/headers/include/thrust/system/detail/generic/copy.inl +0 -2
  601. cuda/cccl/headers/include/thrust/system/detail/generic/copy_if.h +0 -2
  602. cuda/cccl/headers/include/thrust/system/detail/generic/copy_if.inl +0 -3
  603. cuda/cccl/headers/include/thrust/system/detail/generic/count.h +0 -2
  604. cuda/cccl/headers/include/thrust/system/detail/generic/count.inl +0 -2
  605. cuda/cccl/headers/include/thrust/system/detail/generic/equal.h +0 -2
  606. cuda/cccl/headers/include/thrust/system/detail/generic/equal.inl +0 -2
  607. cuda/cccl/headers/include/thrust/system/detail/generic/extrema.h +0 -2
  608. cuda/cccl/headers/include/thrust/system/detail/generic/extrema.inl +0 -3
  609. cuda/cccl/headers/include/thrust/system/detail/generic/fill.h +0 -2
  610. cuda/cccl/headers/include/thrust/system/detail/generic/find.h +0 -2
  611. cuda/cccl/headers/include/thrust/system/detail/generic/find.inl +0 -2
  612. cuda/cccl/headers/include/thrust/system/detail/generic/for_each.h +0 -2
  613. cuda/cccl/headers/include/thrust/system/detail/generic/gather.h +0 -2
  614. cuda/cccl/headers/include/thrust/system/detail/generic/gather.inl +0 -2
  615. cuda/cccl/headers/include/thrust/system/detail/generic/generate.h +0 -2
  616. cuda/cccl/headers/include/thrust/system/detail/generic/inner_product.h +0 -2
  617. cuda/cccl/headers/include/thrust/system/detail/generic/inner_product.inl +0 -2
  618. cuda/cccl/headers/include/thrust/system/detail/generic/logical.h +0 -2
  619. cuda/cccl/headers/include/thrust/system/detail/generic/memory.h +0 -2
  620. cuda/cccl/headers/include/thrust/system/detail/generic/memory.inl +0 -3
  621. cuda/cccl/headers/include/thrust/system/detail/generic/merge.h +0 -2
  622. cuda/cccl/headers/include/thrust/system/detail/generic/merge.inl +0 -2
  623. cuda/cccl/headers/include/thrust/system/detail/generic/mismatch.h +0 -2
  624. cuda/cccl/headers/include/thrust/system/detail/generic/mismatch.inl +0 -2
  625. cuda/cccl/headers/include/thrust/system/detail/generic/partition.h +0 -2
  626. cuda/cccl/headers/include/thrust/system/detail/generic/partition.inl +0 -2
  627. cuda/cccl/headers/include/thrust/system/detail/generic/per_device_resource.h +0 -2
  628. cuda/cccl/headers/include/thrust/system/detail/generic/reduce.h +0 -2
  629. cuda/cccl/headers/include/thrust/system/detail/generic/reduce.inl +0 -2
  630. cuda/cccl/headers/include/thrust/system/detail/generic/reduce_by_key.h +0 -2
  631. cuda/cccl/headers/include/thrust/system/detail/generic/reduce_by_key.inl +0 -3
  632. cuda/cccl/headers/include/thrust/system/detail/generic/remove.h +0 -2
  633. cuda/cccl/headers/include/thrust/system/detail/generic/remove.inl +0 -2
  634. cuda/cccl/headers/include/thrust/system/detail/generic/replace.h +0 -2
  635. cuda/cccl/headers/include/thrust/system/detail/generic/replace.inl +0 -3
  636. cuda/cccl/headers/include/thrust/system/detail/generic/reverse.h +0 -2
  637. cuda/cccl/headers/include/thrust/system/detail/generic/reverse.inl +0 -2
  638. cuda/cccl/headers/include/thrust/system/detail/generic/scalar/binary_search.h +0 -2
  639. cuda/cccl/headers/include/thrust/system/detail/generic/scalar/binary_search.inl +0 -2
  640. cuda/cccl/headers/include/thrust/system/detail/generic/scan.h +26 -12
  641. cuda/cccl/headers/include/thrust/system/detail/generic/scan_by_key.h +0 -2
  642. cuda/cccl/headers/include/thrust/system/detail/generic/scan_by_key.inl +0 -3
  643. cuda/cccl/headers/include/thrust/system/detail/generic/scatter.h +0 -2
  644. cuda/cccl/headers/include/thrust/system/detail/generic/scatter.inl +0 -2
  645. cuda/cccl/headers/include/thrust/system/detail/generic/select_system.h +0 -1
  646. cuda/cccl/headers/include/thrust/system/detail/generic/set_operations.h +0 -2
  647. cuda/cccl/headers/include/thrust/system/detail/generic/set_operations.inl +0 -2
  648. cuda/cccl/headers/include/thrust/system/detail/generic/shuffle.h +0 -2
  649. cuda/cccl/headers/include/thrust/system/detail/generic/shuffle.inl +0 -2
  650. cuda/cccl/headers/include/thrust/system/detail/generic/sort.h +0 -2
  651. cuda/cccl/headers/include/thrust/system/detail/generic/sort.inl +0 -2
  652. cuda/cccl/headers/include/thrust/system/detail/generic/swap_ranges.h +0 -2
  653. cuda/cccl/headers/include/thrust/system/detail/generic/swap_ranges.inl +0 -3
  654. cuda/cccl/headers/include/thrust/system/detail/generic/tabulate.h +0 -2
  655. cuda/cccl/headers/include/thrust/system/detail/generic/tabulate.inl +0 -2
  656. cuda/cccl/headers/include/thrust/system/detail/generic/tag.h +0 -2
  657. cuda/cccl/headers/include/thrust/system/detail/generic/temporary_buffer.h +0 -2
  658. cuda/cccl/headers/include/thrust/system/detail/generic/temporary_buffer.inl +0 -2
  659. cuda/cccl/headers/include/thrust/system/detail/generic/transform.h +0 -2
  660. cuda/cccl/headers/include/thrust/system/detail/generic/transform_reduce.h +0 -2
  661. cuda/cccl/headers/include/thrust/system/detail/generic/transform_reduce.inl +0 -2
  662. cuda/cccl/headers/include/thrust/system/detail/generic/transform_scan.h +0 -2
  663. cuda/cccl/headers/include/thrust/system/detail/generic/transform_scan.inl +0 -2
  664. cuda/cccl/headers/include/thrust/system/detail/generic/uninitialized_copy.h +0 -2
  665. cuda/cccl/headers/include/thrust/system/detail/generic/uninitialized_copy.inl +2 -4
  666. cuda/cccl/headers/include/thrust/system/detail/generic/uninitialized_fill.h +0 -2
  667. cuda/cccl/headers/include/thrust/system/detail/generic/uninitialized_fill.inl +0 -3
  668. cuda/cccl/headers/include/thrust/system/detail/generic/unique.h +0 -2
  669. cuda/cccl/headers/include/thrust/system/detail/generic/unique.inl +0 -2
  670. cuda/cccl/headers/include/thrust/system/detail/generic/unique_by_key.h +0 -2
  671. cuda/cccl/headers/include/thrust/system/detail/generic/unique_by_key.inl +0 -2
  672. cuda/cccl/headers/include/thrust/system/detail/internal/decompose.h +0 -2
  673. cuda/cccl/headers/include/thrust/system/detail/sequential/adjacent_difference.h +0 -2
  674. cuda/cccl/headers/include/thrust/system/detail/sequential/assign_value.h +0 -2
  675. cuda/cccl/headers/include/thrust/system/detail/sequential/binary_search.h +0 -2
  676. cuda/cccl/headers/include/thrust/system/detail/sequential/copy.h +76 -5
  677. cuda/cccl/headers/include/thrust/system/detail/sequential/copy_backward.h +0 -2
  678. cuda/cccl/headers/include/thrust/system/detail/sequential/copy_if.h +0 -2
  679. cuda/cccl/headers/include/thrust/system/detail/sequential/extrema.h +0 -2
  680. cuda/cccl/headers/include/thrust/system/detail/sequential/find.h +0 -2
  681. cuda/cccl/headers/include/thrust/system/detail/sequential/for_each.h +0 -2
  682. cuda/cccl/headers/include/thrust/system/detail/sequential/general_copy.h +0 -3
  683. cuda/cccl/headers/include/thrust/system/detail/sequential/get_value.h +0 -2
  684. cuda/cccl/headers/include/thrust/system/detail/sequential/insertion_sort.h +0 -2
  685. cuda/cccl/headers/include/thrust/system/detail/sequential/iter_swap.h +0 -2
  686. cuda/cccl/headers/include/thrust/system/detail/sequential/malloc_and_free.h +0 -2
  687. cuda/cccl/headers/include/thrust/system/detail/sequential/merge.h +78 -6
  688. cuda/cccl/headers/include/thrust/system/detail/sequential/partition.h +0 -4
  689. cuda/cccl/headers/include/thrust/system/detail/sequential/reduce.h +0 -2
  690. cuda/cccl/headers/include/thrust/system/detail/sequential/reduce_by_key.h +0 -2
  691. cuda/cccl/headers/include/thrust/system/detail/sequential/remove.h +0 -2
  692. cuda/cccl/headers/include/thrust/system/detail/sequential/scan.h +0 -2
  693. cuda/cccl/headers/include/thrust/system/detail/sequential/scan_by_key.h +0 -2
  694. cuda/cccl/headers/include/thrust/system/detail/sequential/set_operations.h +0 -2
  695. cuda/cccl/headers/include/thrust/system/detail/sequential/sort.h +67 -6
  696. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_merge_sort.h +310 -11
  697. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_primitive_sort.h +78 -5
  698. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_radix_sort.h +543 -7
  699. cuda/cccl/headers/include/thrust/system/detail/sequential/trivial_copy.h +0 -2
  700. cuda/cccl/headers/include/thrust/system/detail/sequential/unique.h +0 -2
  701. cuda/cccl/headers/include/thrust/system/detail/sequential/unique_by_key.h +0 -2
  702. cuda/cccl/headers/include/thrust/system/detail/system_error.inl +0 -2
  703. cuda/cccl/headers/include/thrust/system/error_code.h +0 -4
  704. cuda/cccl/headers/include/thrust/system/omp/detail/adjacent_difference.h +5 -25
  705. cuda/cccl/headers/include/thrust/system/omp/detail/assign_value.h +2 -15
  706. cuda/cccl/headers/include/thrust/system/omp/detail/binary_search.h +5 -25
  707. cuda/cccl/headers/include/thrust/system/omp/detail/copy.h +40 -29
  708. cuda/cccl/headers/include/thrust/system/omp/detail/copy_if.h +11 -28
  709. cuda/cccl/headers/include/thrust/system/omp/detail/count.h +2 -15
  710. cuda/cccl/headers/include/thrust/system/omp/detail/default_decomposition.h +26 -28
  711. cuda/cccl/headers/include/thrust/system/omp/detail/equal.h +2 -15
  712. cuda/cccl/headers/include/thrust/system/omp/detail/execution_policy.h +18 -13
  713. cuda/cccl/headers/include/thrust/system/omp/detail/extrema.h +5 -25
  714. cuda/cccl/headers/include/thrust/system/omp/detail/fill.h +2 -15
  715. cuda/cccl/headers/include/thrust/system/omp/detail/find.h +5 -25
  716. cuda/cccl/headers/include/thrust/system/omp/detail/for_each.h +47 -30
  717. cuda/cccl/headers/include/thrust/system/omp/detail/gather.h +2 -15
  718. cuda/cccl/headers/include/thrust/system/omp/detail/generate.h +2 -15
  719. cuda/cccl/headers/include/thrust/system/omp/detail/get_value.h +2 -15
  720. cuda/cccl/headers/include/thrust/system/omp/detail/inner_product.h +2 -15
  721. cuda/cccl/headers/include/thrust/system/omp/detail/iter_swap.h +2 -15
  722. cuda/cccl/headers/include/thrust/system/omp/detail/logical.h +2 -15
  723. cuda/cccl/headers/include/thrust/system/omp/detail/malloc_and_free.h +2 -15
  724. cuda/cccl/headers/include/thrust/system/omp/detail/merge.h +2 -15
  725. cuda/cccl/headers/include/thrust/system/omp/detail/mismatch.h +2 -15
  726. cuda/cccl/headers/include/thrust/system/omp/detail/partition.h +26 -31
  727. cuda/cccl/headers/include/thrust/system/omp/detail/per_device_resource.h +2 -15
  728. cuda/cccl/headers/include/thrust/system/omp/detail/pragma_omp.h +2 -26
  729. cuda/cccl/headers/include/thrust/system/omp/detail/reduce.h +35 -27
  730. cuda/cccl/headers/include/thrust/system/omp/detail/reduce_by_key.h +13 -28
  731. cuda/cccl/headers/include/thrust/system/omp/detail/reduce_intervals.h +56 -28
  732. cuda/cccl/headers/include/thrust/system/omp/detail/remove.h +26 -31
  733. cuda/cccl/headers/include/thrust/system/omp/detail/replace.h +2 -15
  734. cuda/cccl/headers/include/thrust/system/omp/detail/reverse.h +2 -15
  735. cuda/cccl/headers/include/thrust/system/omp/detail/scan.h +176 -17
  736. cuda/cccl/headers/include/thrust/system/omp/detail/scan_by_key.h +8 -15
  737. cuda/cccl/headers/include/thrust/system/omp/detail/scatter.h +2 -15
  738. cuda/cccl/headers/include/thrust/system/omp/detail/sequence.h +2 -15
  739. cuda/cccl/headers/include/thrust/system/omp/detail/set_operations.h +2 -15
  740. cuda/cccl/headers/include/thrust/system/omp/detail/sort.h +213 -28
  741. cuda/cccl/headers/include/thrust/system/omp/detail/swap_ranges.h +2 -15
  742. cuda/cccl/headers/include/thrust/system/omp/detail/tabulate.h +2 -15
  743. cuda/cccl/headers/include/thrust/system/omp/detail/temporary_buffer.h +2 -15
  744. cuda/cccl/headers/include/thrust/system/omp/detail/transform.h +2 -15
  745. cuda/cccl/headers/include/thrust/system/omp/detail/transform_reduce.h +2 -15
  746. cuda/cccl/headers/include/thrust/system/omp/detail/transform_scan.h +2 -15
  747. cuda/cccl/headers/include/thrust/system/omp/detail/uninitialized_copy.h +2 -15
  748. cuda/cccl/headers/include/thrust/system/omp/detail/uninitialized_fill.h +2 -15
  749. cuda/cccl/headers/include/thrust/system/omp/detail/unique.h +21 -30
  750. cuda/cccl/headers/include/thrust/system/omp/detail/unique_by_key.h +17 -29
  751. cuda/cccl/headers/include/thrust/system/omp/memory.h +51 -9
  752. cuda/cccl/headers/include/thrust/system/omp/memory_resource.h +3 -7
  753. cuda/cccl/headers/include/thrust/system/omp/pointer.h +3 -7
  754. cuda/cccl/headers/include/thrust/system/omp/vector.h +3 -6
  755. cuda/cccl/headers/include/thrust/system/system_error.h +0 -2
  756. cuda/cccl/headers/include/thrust/system/tbb/detail/adjacent_difference.h +4 -25
  757. cuda/cccl/headers/include/thrust/system/tbb/detail/assign_value.h +2 -15
  758. cuda/cccl/headers/include/thrust/system/tbb/detail/binary_search.h +2 -15
  759. cuda/cccl/headers/include/thrust/system/tbb/detail/copy.h +38 -29
  760. cuda/cccl/headers/include/thrust/system/tbb/detail/copy_if.h +91 -24
  761. cuda/cccl/headers/include/thrust/system/tbb/detail/count.h +2 -15
  762. cuda/cccl/headers/include/thrust/system/tbb/detail/equal.h +2 -15
  763. cuda/cccl/headers/include/thrust/system/tbb/detail/execution_policy.h +17 -13
  764. cuda/cccl/headers/include/thrust/system/tbb/detail/extrema.h +4 -25
  765. cuda/cccl/headers/include/thrust/system/tbb/detail/fill.h +2 -15
  766. cuda/cccl/headers/include/thrust/system/tbb/detail/find.h +4 -25
  767. cuda/cccl/headers/include/thrust/system/tbb/detail/for_each.h +47 -28
  768. cuda/cccl/headers/include/thrust/system/tbb/detail/gather.h +2 -15
  769. cuda/cccl/headers/include/thrust/system/tbb/detail/generate.h +2 -15
  770. cuda/cccl/headers/include/thrust/system/tbb/detail/get_value.h +2 -15
  771. cuda/cccl/headers/include/thrust/system/tbb/detail/inner_product.h +2 -15
  772. cuda/cccl/headers/include/thrust/system/tbb/detail/iter_swap.h +2 -15
  773. cuda/cccl/headers/include/thrust/system/tbb/detail/logical.h +2 -15
  774. cuda/cccl/headers/include/thrust/system/tbb/detail/malloc_and_free.h +2 -15
  775. cuda/cccl/headers/include/thrust/system/tbb/detail/merge.h +254 -29
  776. cuda/cccl/headers/include/thrust/system/tbb/detail/mismatch.h +2 -15
  777. cuda/cccl/headers/include/thrust/system/tbb/detail/partition.h +25 -31
  778. cuda/cccl/headers/include/thrust/system/tbb/detail/per_device_resource.h +2 -15
  779. cuda/cccl/headers/include/thrust/system/tbb/detail/reduce.h +95 -29
  780. cuda/cccl/headers/include/thrust/system/tbb/detail/reduce_by_key.h +345 -28
  781. cuda/cccl/headers/include/thrust/system/tbb/detail/reduce_intervals.h +4 -26
  782. cuda/cccl/headers/include/thrust/system/tbb/detail/remove.h +32 -42
  783. cuda/cccl/headers/include/thrust/system/tbb/detail/replace.h +2 -15
  784. cuda/cccl/headers/include/thrust/system/tbb/detail/reverse.h +2 -15
  785. cuda/cccl/headers/include/thrust/system/tbb/detail/scan.h +265 -30
  786. cuda/cccl/headers/include/thrust/system/tbb/detail/scan_by_key.h +7 -17
  787. cuda/cccl/headers/include/thrust/system/tbb/detail/scatter.h +2 -15
  788. cuda/cccl/headers/include/thrust/system/tbb/detail/sequence.h +2 -15
  789. cuda/cccl/headers/include/thrust/system/tbb/detail/set_operations.h +2 -15
  790. cuda/cccl/headers/include/thrust/system/tbb/detail/sort.h +244 -32
  791. cuda/cccl/headers/include/thrust/system/tbb/detail/swap_ranges.h +2 -15
  792. cuda/cccl/headers/include/thrust/system/tbb/detail/tabulate.h +2 -15
  793. cuda/cccl/headers/include/thrust/system/tbb/detail/temporary_buffer.h +2 -15
  794. cuda/cccl/headers/include/thrust/system/tbb/detail/transform.h +2 -15
  795. cuda/cccl/headers/include/thrust/system/tbb/detail/transform_reduce.h +2 -15
  796. cuda/cccl/headers/include/thrust/system/tbb/detail/transform_scan.h +2 -15
  797. cuda/cccl/headers/include/thrust/system/tbb/detail/uninitialized_copy.h +2 -15
  798. cuda/cccl/headers/include/thrust/system/tbb/detail/uninitialized_fill.h +2 -15
  799. cuda/cccl/headers/include/thrust/system/tbb/detail/unique.h +23 -33
  800. cuda/cccl/headers/include/thrust/system/tbb/detail/unique_by_key.h +16 -29
  801. cuda/cccl/headers/include/thrust/system/tbb/memory.h +52 -24
  802. cuda/cccl/headers/include/thrust/system/tbb/memory_resource.h +4 -22
  803. cuda/cccl/headers/include/thrust/system/tbb/pointer.h +4 -22
  804. cuda/cccl/headers/include/thrust/system/tbb/vector.h +4 -21
  805. cuda/cccl/headers/include/thrust/transform.h +14 -3
  806. cuda/cccl/headers/include/thrust/type_traits/integer_sequence.h +0 -4
  807. cuda/cccl/headers/include/thrust/type_traits/is_contiguous_iterator.h +0 -1
  808. cuda/cccl/headers/include/thrust/type_traits/is_operator_less_or_greater_function_object.h +0 -4
  809. cuda/cccl/headers/include/thrust/type_traits/is_operator_plus_function_object.h +0 -4
  810. cuda/cccl/headers/include/thrust/type_traits/is_trivially_relocatable.h +0 -4
  811. cuda/cccl/headers/include/thrust/universal_allocator.h +8 -0
  812. cuda/cccl/headers/include/thrust/universal_vector.h +9 -0
  813. cuda/cccl/headers/include/thrust/zip_function.h +2 -28
  814. cuda/compute/__init__.py +4 -0
  815. cuda/compute/_bindings.pyi +26 -3
  816. cuda/compute/_bindings_impl.pyx +143 -1
  817. cuda/compute/algorithms/__init__.py +9 -5
  818. cuda/compute/algorithms/_sort/__init__.py +23 -0
  819. cuda/compute/algorithms/{_merge_sort.py → _sort/_merge_sort.py} +10 -10
  820. cuda/compute/algorithms/{_radix_sort.py → _sort/_radix_sort.py} +9 -58
  821. cuda/compute/algorithms/_sort/_segmented_sort.py +288 -0
  822. cuda/compute/algorithms/_sort/_sort_common.py +52 -0
  823. cuda/compute/cu12/_bindings_impl.cpython-313-aarch64-linux-gnu.so +0 -0
  824. cuda/compute/cu12/cccl/libcccl.c.parallel.so +0 -0
  825. cuda/compute/cu13/_bindings_impl.cpython-313-aarch64-linux-gnu.so +0 -0
  826. cuda/compute/cu13/cccl/libcccl.c.parallel.so +0 -0
  827. cuda_cccl-0.3.4.dist-info/METADATA +78 -0
  828. {cuda_cccl-0.3.2.dist-info → cuda_cccl-0.3.4.dist-info}/RECORD +830 -867
  829. cuda/cccl/headers/include/cuda/__memory_resource/resource_ref.h +0 -652
  830. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/tuple +0 -1365
  831. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/variant +0 -2144
  832. cuda/cccl/headers/include/thrust/detail/integer_math.h +0 -113
  833. cuda/cccl/headers/include/thrust/system/detail/adl/adjacent_difference.h +0 -51
  834. cuda/cccl/headers/include/thrust/system/detail/adl/assign_value.h +0 -51
  835. cuda/cccl/headers/include/thrust/system/detail/adl/binary_search.h +0 -51
  836. cuda/cccl/headers/include/thrust/system/detail/adl/copy.h +0 -51
  837. cuda/cccl/headers/include/thrust/system/detail/adl/copy_if.h +0 -52
  838. cuda/cccl/headers/include/thrust/system/detail/adl/count.h +0 -51
  839. cuda/cccl/headers/include/thrust/system/detail/adl/equal.h +0 -51
  840. cuda/cccl/headers/include/thrust/system/detail/adl/extrema.h +0 -51
  841. cuda/cccl/headers/include/thrust/system/detail/adl/fill.h +0 -51
  842. cuda/cccl/headers/include/thrust/system/detail/adl/find.h +0 -51
  843. cuda/cccl/headers/include/thrust/system/detail/adl/for_each.h +0 -51
  844. cuda/cccl/headers/include/thrust/system/detail/adl/gather.h +0 -51
  845. cuda/cccl/headers/include/thrust/system/detail/adl/generate.h +0 -51
  846. cuda/cccl/headers/include/thrust/system/detail/adl/get_value.h +0 -51
  847. cuda/cccl/headers/include/thrust/system/detail/adl/inner_product.h +0 -51
  848. cuda/cccl/headers/include/thrust/system/detail/adl/iter_swap.h +0 -51
  849. cuda/cccl/headers/include/thrust/system/detail/adl/logical.h +0 -51
  850. cuda/cccl/headers/include/thrust/system/detail/adl/malloc_and_free.h +0 -51
  851. cuda/cccl/headers/include/thrust/system/detail/adl/merge.h +0 -51
  852. cuda/cccl/headers/include/thrust/system/detail/adl/mismatch.h +0 -51
  853. cuda/cccl/headers/include/thrust/system/detail/adl/partition.h +0 -51
  854. cuda/cccl/headers/include/thrust/system/detail/adl/per_device_resource.h +0 -51
  855. cuda/cccl/headers/include/thrust/system/detail/adl/reduce.h +0 -51
  856. cuda/cccl/headers/include/thrust/system/detail/adl/reduce_by_key.h +0 -51
  857. cuda/cccl/headers/include/thrust/system/detail/adl/remove.h +0 -51
  858. cuda/cccl/headers/include/thrust/system/detail/adl/replace.h +0 -51
  859. cuda/cccl/headers/include/thrust/system/detail/adl/reverse.h +0 -51
  860. cuda/cccl/headers/include/thrust/system/detail/adl/scan.h +0 -51
  861. cuda/cccl/headers/include/thrust/system/detail/adl/scan_by_key.h +0 -51
  862. cuda/cccl/headers/include/thrust/system/detail/adl/scatter.h +0 -51
  863. cuda/cccl/headers/include/thrust/system/detail/adl/sequence.h +0 -51
  864. cuda/cccl/headers/include/thrust/system/detail/adl/set_operations.h +0 -51
  865. cuda/cccl/headers/include/thrust/system/detail/adl/sort.h +0 -51
  866. cuda/cccl/headers/include/thrust/system/detail/adl/swap_ranges.h +0 -51
  867. cuda/cccl/headers/include/thrust/system/detail/adl/tabulate.h +0 -51
  868. cuda/cccl/headers/include/thrust/system/detail/adl/temporary_buffer.h +0 -51
  869. cuda/cccl/headers/include/thrust/system/detail/adl/transform.h +0 -51
  870. cuda/cccl/headers/include/thrust/system/detail/adl/transform_reduce.h +0 -51
  871. cuda/cccl/headers/include/thrust/system/detail/adl/transform_scan.h +0 -51
  872. cuda/cccl/headers/include/thrust/system/detail/adl/uninitialized_copy.h +0 -51
  873. cuda/cccl/headers/include/thrust/system/detail/adl/uninitialized_fill.h +0 -51
  874. cuda/cccl/headers/include/thrust/system/detail/adl/unique.h +0 -51
  875. cuda/cccl/headers/include/thrust/system/detail/adl/unique_by_key.h +0 -51
  876. cuda/cccl/headers/include/thrust/system/detail/generic/scan.inl +0 -85
  877. cuda/cccl/headers/include/thrust/system/detail/sequential/copy.inl +0 -119
  878. cuda/cccl/headers/include/thrust/system/detail/sequential/merge.inl +0 -145
  879. cuda/cccl/headers/include/thrust/system/detail/sequential/sort.inl +0 -116
  880. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_merge_sort.inl +0 -356
  881. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_primitive_sort.inl +0 -124
  882. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_radix_sort.inl +0 -586
  883. cuda/cccl/headers/include/thrust/system/omp/detail/copy.inl +0 -74
  884. cuda/cccl/headers/include/thrust/system/omp/detail/copy_if.inl +0 -59
  885. cuda/cccl/headers/include/thrust/system/omp/detail/default_decomposition.inl +0 -65
  886. cuda/cccl/headers/include/thrust/system/omp/detail/for_each.inl +0 -87
  887. cuda/cccl/headers/include/thrust/system/omp/detail/memory.inl +0 -93
  888. cuda/cccl/headers/include/thrust/system/omp/detail/partition.inl +0 -102
  889. cuda/cccl/headers/include/thrust/system/omp/detail/reduce.inl +0 -78
  890. cuda/cccl/headers/include/thrust/system/omp/detail/reduce_by_key.inl +0 -65
  891. cuda/cccl/headers/include/thrust/system/omp/detail/reduce_intervals.inl +0 -103
  892. cuda/cccl/headers/include/thrust/system/omp/detail/remove.inl +0 -87
  893. cuda/cccl/headers/include/thrust/system/omp/detail/sort.inl +0 -265
  894. cuda/cccl/headers/include/thrust/system/omp/detail/unique.inl +0 -71
  895. cuda/cccl/headers/include/thrust/system/omp/detail/unique_by_key.inl +0 -75
  896. cuda/cccl/headers/include/thrust/system/tbb/detail/copy.inl +0 -73
  897. cuda/cccl/headers/include/thrust/system/tbb/detail/copy_if.inl +0 -136
  898. cuda/cccl/headers/include/thrust/system/tbb/detail/for_each.inl +0 -91
  899. cuda/cccl/headers/include/thrust/system/tbb/detail/memory.inl +0 -94
  900. cuda/cccl/headers/include/thrust/system/tbb/detail/merge.inl +0 -327
  901. cuda/cccl/headers/include/thrust/system/tbb/detail/partition.inl +0 -98
  902. cuda/cccl/headers/include/thrust/system/tbb/detail/reduce.inl +0 -137
  903. cuda/cccl/headers/include/thrust/system/tbb/detail/reduce_by_key.inl +0 -400
  904. cuda/cccl/headers/include/thrust/system/tbb/detail/remove.inl +0 -87
  905. cuda/cccl/headers/include/thrust/system/tbb/detail/scan.inl +0 -312
  906. cuda/cccl/headers/include/thrust/system/tbb/detail/sort.inl +0 -295
  907. cuda/cccl/headers/include/thrust/system/tbb/detail/unique.inl +0 -71
  908. cuda/cccl/headers/include/thrust/system/tbb/detail/unique_by_key.inl +0 -75
  909. cuda_cccl-0.3.2.dist-info/METADATA +0 -42
  910. {cuda_cccl-0.3.2.dist-info → cuda_cccl-0.3.4.dist-info}/WHEEL +0 -0
  911. {cuda_cccl-0.3.2.dist-info → cuda_cccl-0.3.4.dist-info}/licenses/LICENSE +0 -0
@@ -1,1365 +0,0 @@
1
- // -*- C++ -*-
2
- //===--------------------------- tuple ------------------------------------===//
3
- //
4
- // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5
- // See https://llvm.org/LICENSE.txt for license information.
6
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
- //
8
- //===----------------------------------------------------------------------===//
9
-
10
- #ifndef _LIBCUDACXX_TUPLE
11
- #define _LIBCUDACXX_TUPLE
12
-
13
- /*
14
- tuple synopsis
15
-
16
- namespace std
17
- {
18
-
19
- template <class... T>
20
- class tuple {
21
- public:
22
- explicit(see-below) constexpr tuple();
23
- explicit(see-below) tuple(const T&...); // constexpr in C++14
24
- template <class... U>
25
- explicit(see-below) tuple(U&&...); // constexpr in C++14
26
- tuple(const tuple&) = default;
27
- tuple(tuple&&) = default;
28
- template <class... U>
29
- explicit(see-below) tuple(const tuple<U...>&); // constexpr in C++14
30
- template <class... U>
31
- explicit(see-below) tuple(tuple<U...>&&); // constexpr in C++14
32
- template <class U1, class U2>
33
- explicit(see-below) tuple(const pair<U1, U2>&); // iff sizeof...(T) == 2
34
- // constexpr in C++14 template <class U1, class U2> explicit(see-below)
35
- tuple(pair<U1, U2>&&); // iff sizeof...(T) == 2 // constexpr in C++14
36
-
37
- // allocator-extended constructors
38
- template <class Alloc>
39
- tuple(allocator_arg_t, const Alloc& a);
40
- template <class Alloc>
41
- explicit(see-below) tuple(allocator_arg_t, const Alloc& a, const T&...);
42
- template <class Alloc, class... U>
43
- explicit(see-below) tuple(allocator_arg_t, const Alloc& a, U&&...);
44
- template <class Alloc>
45
- tuple(allocator_arg_t, const Alloc& a, const tuple&);
46
- template <class Alloc>
47
- tuple(allocator_arg_t, const Alloc& a, tuple&&);
48
- template <class Alloc, class... U>
49
- explicit(see-below) tuple(allocator_arg_t, const Alloc& a, const
50
- tuple<U...>&); template <class Alloc, class... U> explicit(see-below)
51
- tuple(allocator_arg_t, const Alloc& a, tuple<U...>&&); template <class Alloc,
52
- class U1, class U2> explicit(see-below) tuple(allocator_arg_t, const Alloc& a,
53
- const pair<U1, U2>&); template <class Alloc, class U1, class U2>
54
- explicit(see-below) tuple(allocator_arg_t, const Alloc& a, pair<U1,
55
- U2>&&);
56
-
57
- tuple& operator=(const tuple&);
58
- tuple&
59
- operator=(tuple&&) noexcept(AND(is_nothrow_move_assignable<T>::value
60
- ...)); template <class... U> tuple& operator=(const tuple<U...>&); template
61
- <class... U> tuple& operator=(tuple<U...>&&); template <class U1, class U2>
62
- tuple& operator=(const pair<U1, U2>&); // iff sizeof...(T) == 2
63
- template <class U1, class U2>
64
- tuple& operator=(pair<U1, U2>&&); // iff sizeof...(T) == 2
65
-
66
- void swap(tuple&) noexcept(AND(swap(declval<T&>(), declval<T&>())...));
67
- };
68
-
69
- template <class ...T>
70
- tuple(T...) -> tuple<T...>; // since
71
- C++17 template <class T1, class T2> tuple(pair<T1, T2>) -> tuple<T1, T2>; //
72
- since C++17 template <class Alloc, class ...T> tuple(allocator_arg_t, Alloc,
73
- T...) -> tuple<T...>; // since C++17 template <class Alloc,
74
- class T1, class T2> tuple(allocator_arg_t, Alloc, pair<T1, T2>) -> tuple<T1,
75
- T2>; // since C++17 template <class Alloc, class ...T>
76
- tuple(allocator_arg_t, Alloc, tuple<T...>) -> tuple<T...>; // since
77
- C++17
78
-
79
- inline constexpr unspecified ignore;
80
-
81
- template <class... T> tuple<V...> make_tuple(T&&...); // constexpr in C++14
82
- template <class... T> tuple<ATypes...> forward_as_tuple(T&&...) noexcept; //
83
- constexpr in C++14 template <class... T> tuple<T&...> tie(T&...) noexcept; //
84
- constexpr in C++14 template <class... Tuples> tuple<CTypes...>
85
- tuple_cat(Tuples&&... tpls); // constexpr in C++14
86
-
87
- // [tuple.apply], calling a function with a tuple of arguments:
88
- template <class F, class Tuple>
89
- constexpr decltype(auto) apply(F&& f, Tuple&& t); // C++17
90
- template <class T, class Tuple>
91
- constexpr T make_from_tuple(Tuple&& t); // C++17
92
-
93
- // 20.4.1.4, tuple helper classes:
94
- template <class T> struct tuple_size; // undefined
95
- template <class... T> struct tuple_size<tuple<T...>>;
96
- template <class T>
97
- inline constexpr size_t tuple_size_v = tuple_size<T>::value; // C++17
98
- template <size_t I, class T> struct tuple_element; // undefined
99
- template <size_t I, class... T> struct tuple_element<I, tuple<T...>>;
100
- template <size_t I, class T>
101
- using tuple_element_t = typename tuple_element <I, T>::type; // C++14
102
-
103
- // 20.4.1.5, element access:
104
- template <size_t I, class... T>
105
- typename tuple_element<I, tuple<T...>>::type&
106
- get(tuple<T...>&) noexcept; // constexpr in C++14
107
- template <size_t I, class... T>
108
- const typename tuple_element<I, tuple<T...>>::type&
109
- get(const tuple<T...>&) noexcept; // constexpr in C++14
110
- template <size_t I, class... T>
111
- typename tuple_element<I, tuple<T...>>::type&&
112
- get(tuple<T...>&&) noexcept; // constexpr in C++14
113
- template <size_t I, class... T>
114
- const typename tuple_element<I, tuple<T...>>::type&&
115
- get(const tuple<T...>&&) noexcept; // constexpr in C++14
116
-
117
- template <class T1, class... T>
118
- constexpr T1& get(tuple<T...>&) noexcept; // C++14
119
- template <class T1, class... T>
120
- constexpr const T1& get(const tuple<T...>&) noexcept; // C++14
121
- template <class T1, class... T>
122
- constexpr T1&& get(tuple<T...>&&) noexcept; // C++14
123
- template <class T1, class... T>
124
- constexpr const T1&& get(const tuple<T...>&&) noexcept; // C++14
125
-
126
- // 20.4.1.6, relational operators:
127
- template<class... T, class... U> bool operator==(const tuple<T...>&, const
128
- tuple<U...>&); // constexpr in C++14 template<class... T, class... U> bool
129
- operator<(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14
130
- template<class... T, class... U> bool operator!=(const tuple<T...>&, const
131
- tuple<U...>&); // constexpr in C++14 template<class... T, class... U> bool
132
- operator>(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14
133
- template<class... T, class... U> bool operator<=(const tuple<T...>&, const
134
- tuple<U...>&); // constexpr in C++14 template<class... T, class... U> bool
135
- operator>=(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14
136
-
137
- template <class... Types, class Alloc>
138
- struct uses_allocator<tuple<Types...>, Alloc>;
139
-
140
- template <class... Types>
141
- void
142
- swap(tuple<Types...>& x, tuple<Types...>& y) noexcept(noexcept(x.swap(y)));
143
-
144
- } // std
145
-
146
- */
147
-
148
- #include <cuda/std/detail/__config>
149
-
150
- #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
151
- # pragma GCC system_header
152
- #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
153
- # pragma clang system_header
154
- #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
155
- # pragma system_header
156
- #endif // no system header
157
-
158
- #include <cuda/std/__functional/unwrap_ref.h>
159
- #include <cuda/std/__fwd/array.h>
160
- #include <cuda/std/__memory/allocator_arg_t.h>
161
- #include <cuda/std/__tuple_dir/ignore.h>
162
- #include <cuda/std/__tuple_dir/make_tuple_types.h>
163
- #include <cuda/std/__tuple_dir/sfinae_helpers.h>
164
- #include <cuda/std/__tuple_dir/structured_bindings.h>
165
- #include <cuda/std/__tuple_dir/tuple_element.h>
166
- #include <cuda/std/__tuple_dir/tuple_indices.h>
167
- #include <cuda/std/__tuple_dir/tuple_like.h>
168
- #include <cuda/std/__tuple_dir/tuple_size.h>
169
- #include <cuda/std/__tuple_dir/tuple_types.h>
170
- #include <cuda/std/__tuple_dir/vector_types.h>
171
- #include <cuda/std/__type_traits/copy_cvref.h>
172
- #include <cuda/std/__type_traits/maybe_const.h>
173
- #include <cuda/std/__type_traits/reference_constructs_from_temporary.h>
174
- #include <cuda/std/__type_traits/remove_const.h>
175
- #include <cuda/std/__utility/forward.h>
176
- #include <cuda/std/__utility/integer_sequence.h>
177
- #include <cuda/std/__utility/move.h>
178
- #include <cuda/std/__utility/pair.h>
179
- #include <cuda/std/__utility/piecewise_construct.h>
180
- #include <cuda/std/__utility/swap.h>
181
- #include <cuda/std/climits>
182
- #include <cuda/std/cstddef>
183
- #include <cuda/std/cstdint>
184
- #include <cuda/std/type_traits>
185
- #include <cuda/std/utility>
186
-
187
- // standard-mandated includes
188
- #include <cuda/std/version>
189
-
190
- // [tuple.syn]
191
- #if _LIBCUDACXX_HAS_SPACESHIP_OPERATOR()
192
- # include <cuda/std/compare>
193
- #endif // _LIBCUDACXX_HAS_SPACESHIP_OPERATOR()
194
-
195
- #include <cuda/std/__cccl/prologue.h>
196
-
197
- _CCCL_BEGIN_NAMESPACE_CUDA_STD
198
-
199
- template <class>
200
- struct __is_tuple_of_iterator_references : ::cuda::std::false_type
201
- {};
202
-
203
- // __tuple_leaf
204
- struct __tuple_leaf_default_constructor_tag
205
- {};
206
-
207
- enum class __tuple_leaf_specialization
208
- {
209
- __default,
210
- __synthesize_assignment,
211
- __empty_non_final,
212
- };
213
-
214
- template <class _Tp>
215
- _CCCL_API constexpr __tuple_leaf_specialization __tuple_leaf_choose()
216
- {
217
- return is_empty_v<_Tp> && !is_final_v<_Tp> ? __tuple_leaf_specialization::__empty_non_final
218
- : __must_synthesize_assignment_v<_Tp>
219
- ? __tuple_leaf_specialization::__synthesize_assignment
220
- : __tuple_leaf_specialization::__default;
221
- }
222
-
223
- template <size_t _Ip, class _Hp, __tuple_leaf_specialization = __tuple_leaf_choose<_Hp>()>
224
- class __tuple_leaf;
225
-
226
- _CCCL_EXEC_CHECK_DISABLE
227
- template <size_t _Ip, class _Hp, __tuple_leaf_specialization _Ep>
228
- _CCCL_API inline void swap(__tuple_leaf<_Ip, _Hp, _Ep>& __x,
229
- __tuple_leaf<_Ip, _Hp, _Ep>& __y) noexcept(is_nothrow_swappable_v<_Hp>)
230
- {
231
- swap(__x.get(), __y.get());
232
- }
233
-
234
- _CCCL_DIAG_PUSH
235
- _CCCL_DIAG_SUPPRESS_MSVC(4244) // conversion from '_Tp' to '_Hp', possible loss of data
236
-
237
- template <size_t _Ip, class _Hp>
238
- class __tuple_leaf<_Ip, _Hp, __tuple_leaf_specialization::__default>
239
- {
240
- _Hp __value_;
241
-
242
- #if defined(_CCCL_BUILTIN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY)
243
- template <class _Up>
244
- static constexpr bool __can_bind_reference = !reference_constructs_from_temporary_v<_Hp&, _Up>;
245
- #else
246
- template <class _Up>
247
- static constexpr bool __can_bind_reference = true;
248
- #endif // !_CCCL_BUILTIN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY
249
-
250
- public:
251
- _CCCL_EXEC_CHECK_DISABLE
252
- _CCCL_API constexpr __tuple_leaf() noexcept(is_nothrow_default_constructible_v<_Hp>)
253
- : __value_()
254
- {}
255
-
256
- _CCCL_EXEC_CHECK_DISABLE
257
- _CCCL_API constexpr __tuple_leaf(__tuple_leaf_default_constructor_tag) noexcept(
258
- is_nothrow_default_constructible_v<_Hp>)
259
- : __value_()
260
- {}
261
-
262
- _CCCL_EXEC_CHECK_DISABLE
263
- template <class _Alloc>
264
- _CCCL_API inline __tuple_leaf(integral_constant<int, 0>, const _Alloc&)
265
- : __value_()
266
- {}
267
-
268
- _CCCL_EXEC_CHECK_DISABLE
269
- template <class _Alloc>
270
- _CCCL_API inline __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a)
271
- : __value_(allocator_arg_t(), __a)
272
- {}
273
-
274
- _CCCL_EXEC_CHECK_DISABLE
275
- template <class _Alloc>
276
- _CCCL_API inline __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a)
277
- : __value_(__a)
278
- {}
279
-
280
- template <class _Tp>
281
- using __can_forward = _And<_IsNotSame<remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp>>;
282
-
283
- _CCCL_EXEC_CHECK_DISABLE
284
- template <class _Tp, enable_if_t<__can_forward<_Tp>::value, int> = 0>
285
- _CCCL_API constexpr explicit __tuple_leaf(_Tp&& __t) noexcept(is_nothrow_constructible_v<_Hp, _Tp>)
286
- : __value_(::cuda::std::forward<_Tp>(__t))
287
- {}
288
-
289
- _CCCL_EXEC_CHECK_DISABLE
290
- template <class _Tp, class _Alloc>
291
- _CCCL_API inline explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
292
- : __value_(::cuda::std::forward<_Tp>(__t))
293
- {}
294
-
295
- _CCCL_EXEC_CHECK_DISABLE
296
- template <class _Tp, class _Alloc>
297
- _CCCL_API inline explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a, _Tp&& __t)
298
- : __value_(allocator_arg_t(), __a, ::cuda::std::forward<_Tp>(__t))
299
- {}
300
-
301
- _CCCL_EXEC_CHECK_DISABLE
302
- template <class _Tp, class _Alloc>
303
- _CCCL_API inline explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
304
- : __value_(::cuda::std::forward<_Tp>(__t), __a)
305
- {}
306
-
307
- _CCCL_EXEC_CHECK_DISABLE
308
- template <class _Tp>
309
- _CCCL_API inline __tuple_leaf& operator=(_Tp&& __t) noexcept(is_nothrow_assignable_v<_Hp&, _Tp>)
310
- {
311
- __value_ = ::cuda::std::forward<_Tp>(__t);
312
- return *this;
313
- }
314
-
315
- _CCCL_API inline int swap(__tuple_leaf& __t) noexcept(is_nothrow_swappable_v<__tuple_leaf>)
316
- {
317
- ::cuda::std::swap(*this, __t);
318
- return 0;
319
- }
320
-
321
- _CCCL_API constexpr _Hp& get() noexcept
322
- {
323
- return __value_;
324
- }
325
- _CCCL_API constexpr const _Hp& get() const noexcept
326
- {
327
- return __value_;
328
- }
329
- };
330
-
331
- template <size_t _Ip, class _Hp>
332
- class __tuple_leaf<_Ip, _Hp, __tuple_leaf_specialization::__synthesize_assignment>
333
- {
334
- _Hp __value_;
335
-
336
- #if defined(_CCCL_BUILTIN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY)
337
- template <class _Up>
338
- static constexpr bool __can_bind_reference = !reference_constructs_from_temporary_v<_Hp&, _Up>;
339
- #else
340
- template <class _Up>
341
- static constexpr bool __can_bind_reference = true;
342
- #endif // !_CCCL_BUILTIN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY
343
-
344
- public:
345
- _CCCL_EXEC_CHECK_DISABLE
346
- _CCCL_API constexpr __tuple_leaf() noexcept(is_nothrow_default_constructible_v<_Hp>)
347
- : __value_()
348
- {
349
- static_assert(!is_reference_v<_Hp>, "Attempted to default construct a reference element in a tuple");
350
- }
351
-
352
- template <class _Tp>
353
- using __can_forward = _And<_IsNotSame<remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp>>;
354
-
355
- _CCCL_EXEC_CHECK_DISABLE
356
- template <class _Tp, enable_if_t<__can_forward<_Tp>::value, int> = 0>
357
- _CCCL_API constexpr explicit __tuple_leaf(_Tp&& __t) noexcept(is_nothrow_constructible_v<_Hp, _Tp>)
358
- : __value_(::cuda::std::forward<_Tp>(__t))
359
- {
360
- static_assert(__can_bind_reference<_Tp&&>,
361
- "Attempted construction of reference element "
362
- "binds to a temporary whose lifetime has ended");
363
- }
364
-
365
- _CCCL_EXEC_CHECK_DISABLE
366
- template <class _Tp, class _Alloc>
367
- _CCCL_API inline explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
368
- : __value_(::cuda::std::forward<_Tp>(__t))
369
- {
370
- static_assert(__can_bind_reference<_Tp&&>,
371
- "Attempted construction of reference element binds to a "
372
- "temporary whose lifetime has ended");
373
- }
374
-
375
- _CCCL_EXEC_CHECK_DISABLE
376
- __tuple_leaf(const __tuple_leaf& __t) = default;
377
- _CCCL_EXEC_CHECK_DISABLE
378
- __tuple_leaf(__tuple_leaf&& __t) = default;
379
-
380
- _CCCL_EXEC_CHECK_DISABLE
381
- _CCCL_API constexpr __tuple_leaf& operator=(const __tuple_leaf& __t) noexcept
382
- {
383
- __value_ = __t.__value_;
384
- return *this;
385
- }
386
- _CCCL_EXEC_CHECK_DISABLE
387
- _CCCL_API constexpr __tuple_leaf& operator=(__tuple_leaf&& __t) noexcept
388
- {
389
- __value_ = ::cuda::std::move(__t.__value_);
390
- return *this;
391
- }
392
-
393
- _CCCL_EXEC_CHECK_DISABLE
394
- template <class _Tp>
395
- _CCCL_API inline __tuple_leaf& operator=(_Tp&& __t) noexcept(is_nothrow_assignable_v<_Hp&, _Tp>)
396
- {
397
- __value_ = ::cuda::std::forward<_Tp>(__t);
398
- return *this;
399
- }
400
-
401
- _CCCL_API inline int swap(__tuple_leaf& __t) noexcept(is_nothrow_swappable_v<__tuple_leaf>)
402
- {
403
- ::cuda::std::swap(*this, __t);
404
- return 0;
405
- }
406
-
407
- _CCCL_API constexpr _Hp& get() noexcept
408
- {
409
- return __value_;
410
- }
411
- _CCCL_API constexpr const _Hp& get() const noexcept
412
- {
413
- return __value_;
414
- }
415
- };
416
-
417
- template <size_t _Ip, class _Hp>
418
- class __tuple_leaf<_Ip, _Hp, __tuple_leaf_specialization::__empty_non_final> : private remove_const_t<_Hp>
419
- {
420
- public:
421
- _CCCL_EXEC_CHECK_DISABLE
422
- _CCCL_API constexpr __tuple_leaf() noexcept(is_nothrow_default_constructible<_Hp>::value) {}
423
-
424
- _CCCL_EXEC_CHECK_DISABLE
425
- _CCCL_API constexpr __tuple_leaf(__tuple_leaf_default_constructor_tag) noexcept(
426
- is_nothrow_default_constructible_v<_Hp>)
427
- : _Hp()
428
- {}
429
-
430
- _CCCL_EXEC_CHECK_DISABLE
431
- template <class _Alloc>
432
- _CCCL_API inline __tuple_leaf(integral_constant<int, 0>, const _Alloc&)
433
- {}
434
-
435
- _CCCL_EXEC_CHECK_DISABLE
436
- template <class _Alloc>
437
- _CCCL_API inline __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a)
438
- : _Hp(allocator_arg_t(), __a)
439
- {}
440
-
441
- _CCCL_EXEC_CHECK_DISABLE
442
- template <class _Alloc>
443
- _CCCL_API inline __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a)
444
- : _Hp(__a)
445
- {}
446
-
447
- template <class _Tp>
448
- using __can_forward = _And<_IsNotSame<remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp>>;
449
-
450
- _CCCL_EXEC_CHECK_DISABLE
451
- template <class _Tp, enable_if_t<__can_forward<_Tp>::value, int> = 0>
452
- _CCCL_API constexpr explicit __tuple_leaf(_Tp&& __t) noexcept((is_nothrow_constructible<_Hp, _Tp>::value))
453
- : _Hp(::cuda::std::forward<_Tp>(__t))
454
- {}
455
-
456
- _CCCL_EXEC_CHECK_DISABLE
457
- template <class _Tp, class _Alloc>
458
- _CCCL_API inline explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
459
- : _Hp(::cuda::std::forward<_Tp>(__t))
460
- {}
461
-
462
- _CCCL_EXEC_CHECK_DISABLE
463
- template <class _Tp, class _Alloc>
464
- _CCCL_API inline explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a, _Tp&& __t)
465
- : _Hp(allocator_arg_t(), __a, ::cuda::std::forward<_Tp>(__t))
466
- {}
467
-
468
- _CCCL_EXEC_CHECK_DISABLE
469
- template <class _Tp, class _Alloc>
470
- _CCCL_API inline explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
471
- : _Hp(::cuda::std::forward<_Tp>(__t), __a)
472
- {}
473
-
474
- _CCCL_EXEC_CHECK_DISABLE
475
- template <class _Tp, enable_if_t<is_assignable_v<_Hp&, const _Tp&>, int> = 0>
476
- _CCCL_API inline __tuple_leaf& operator=(const _Tp& __t) noexcept(is_nothrow_assignable_v<_Hp&, const _Tp&>)
477
- {
478
- _Hp::operator=(__t);
479
- return *this;
480
- }
481
-
482
- _CCCL_EXEC_CHECK_DISABLE
483
- template <class _Tp, enable_if_t<is_assignable_v<_Hp&, _Tp>, int> = 0>
484
- _CCCL_API inline __tuple_leaf& operator=(_Tp&& __t) noexcept(is_nothrow_assignable_v<_Hp&, _Tp>)
485
- {
486
- _Hp::operator=(::cuda::std::forward<_Tp>(__t));
487
- return *this;
488
- }
489
-
490
- _CCCL_EXEC_CHECK_DISABLE
491
- _CCCL_API inline int swap(__tuple_leaf& __t) noexcept(is_nothrow_swappable_v<__tuple_leaf>)
492
- {
493
- ::cuda::std::swap(*this, __t);
494
- return 0;
495
- }
496
-
497
- _CCCL_API constexpr _Hp& get() noexcept
498
- {
499
- return static_cast<_Hp&>(*this);
500
- }
501
- _CCCL_API constexpr const _Hp& get() const noexcept
502
- {
503
- return static_cast<const _Hp&>(*this);
504
- }
505
- };
506
-
507
- _CCCL_DIAG_POP
508
-
509
- template <class... _Tp>
510
- _CCCL_API inline void __swallow(_Tp&&...) noexcept
511
- {}
512
-
513
- template <class _Tp>
514
- struct __all_default_constructible;
515
-
516
- template <class... _Tp>
517
- struct __all_default_constructible<__tuple_types<_Tp...>> : __all<is_default_constructible_v<_Tp>...>
518
- {};
519
-
520
- struct __tuple_variadic_constructor_tag
521
- {};
522
-
523
- // __tuple_impl
524
-
525
- template <class... _Tp>
526
- inline constexpr bool __tuple_all_copy_assignable_v = (is_copy_assignable_v<_Tp> && ... && true);
527
-
528
- template <class... _Tp>
529
- inline constexpr bool __tuple_all_move_assignable_v = (is_move_assignable_v<_Tp> && ... && true);
530
-
531
- template <class _Indx, class... _Tp>
532
- struct _CCCL_DECLSPEC_EMPTY_BASES __tuple_impl;
533
-
534
- template <size_t... _Indx, class... _Tp>
535
- struct _CCCL_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
536
- : public __tuple_leaf<_Indx, _Tp>...
537
- , public __tuple_impl_sfinae_helper<__tuple_impl<__tuple_indices<_Indx...>, _Tp...>,
538
- __tuple_all_copy_assignable_v<_Tp...>,
539
- __tuple_all_move_assignable_v<_Tp...>>
540
- {
541
- _CCCL_API constexpr __tuple_impl() noexcept(__all<is_nothrow_default_constructible_v<_Tp>...>::value)
542
- : __tuple_leaf<_Indx, _Tp>()...
543
- {}
544
-
545
- // Handle non-allocator, full initialization
546
- // Old MSVC cannot handle the noexept specifier outside of template arguments
547
- template <class... _Up,
548
- enable_if_t<sizeof...(_Up) == sizeof...(_Tp), int> = 0,
549
- bool __all_nothrow_constructible = __all<is_nothrow_constructible_v<_Tp, _Up>...>::value>
550
- _CCCL_API constexpr explicit __tuple_impl(__tuple_variadic_constructor_tag,
551
- _Up&&... __u) noexcept(__all_nothrow_constructible)
552
- : __tuple_leaf<_Indx, _Tp>(::cuda::std::forward<_Up>(__u))...
553
- {}
554
-
555
- // Handle non-allocator, partial default initialization
556
- // Recursively delegate until we have full rank
557
- template <class... _Up, enable_if_t<sizeof...(_Up) < sizeof...(_Tp), int> = 0>
558
- _CCCL_API constexpr explicit __tuple_impl(__tuple_variadic_constructor_tag __tag, _Up&&... __u) noexcept(
559
- noexcept(__tuple_impl(__tag, ::cuda::std::forward<_Up>(__u)..., __tuple_leaf_default_constructor_tag{})))
560
- : __tuple_impl(__tag, ::cuda::std::forward<_Up>(__u)..., __tuple_leaf_default_constructor_tag{})
561
- {}
562
-
563
- // Handle allocator aware, full initialization
564
- template <class _Alloc, class... _Up, enable_if_t<sizeof...(_Up) == sizeof...(_Tp), int> = 0>
565
- _CCCL_API inline explicit __tuple_impl(
566
- allocator_arg_t, const _Alloc& __a, __tuple_variadic_constructor_tag, _Up&&... __u)
567
- : __tuple_leaf<_Indx, _Tp>(__uses_alloc_ctor<_Tp, _Alloc, _Up>(), __a, ::cuda::std::forward<_Up>(__u))...
568
- {}
569
-
570
- // Handle allocator aware, full default initialization
571
- template <class _Alloc>
572
- _CCCL_API inline explicit __tuple_impl(allocator_arg_t, const _Alloc& __a)
573
- : __tuple_leaf<_Indx, _Tp>(__uses_alloc_ctor<_Tp, _Alloc>(), __a)...
574
- {}
575
-
576
- template <class _Tuple, size_t _Indx2>
577
- using __tuple_elem_at = tuple_element_t<_Indx2, __make_tuple_types_t<_Tuple>>;
578
-
579
- template <class _Tuple, enable_if_t<__tuple_constructible<_Tuple, tuple<_Tp...>>::value, int> = 0>
580
- _CCCL_API constexpr __tuple_impl(_Tuple&& __t) noexcept(
581
- (__all<is_nothrow_constructible_v<_Tp, __tuple_elem_at<_Tuple, _Indx>>...>::value))
582
- : __tuple_leaf<_Indx, _Tp>(::cuda::std::forward<__tuple_elem_at<_Tuple, _Indx>>(::cuda::std::get<_Indx>(__t)))...
583
- {}
584
-
585
- template <class _Alloc, class _Tuple, enable_if_t<__tuple_constructible<_Tuple, tuple<_Tp...>>::value, int> = 0>
586
- _CCCL_API inline __tuple_impl(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
587
- : __tuple_leaf<_Indx, _Tp>(__uses_alloc_ctor<_Tp, _Alloc, __tuple_elem_at<_Tuple, _Indx>>(),
588
- __a,
589
- ::cuda::std::forward<__tuple_elem_at<_Tuple, _Indx>>(::cuda::std::get<_Indx>(__t)))...
590
- {}
591
-
592
- template <class _Tuple, enable_if_t<__tuple_assignable<_Tuple, tuple<_Tp...>>::value, int> = 0>
593
- _CCCL_API inline __tuple_impl&
594
- operator=(_Tuple&& __t) noexcept((__all<is_nothrow_assignable_v<_Tp&, __tuple_elem_at<_Tuple, _Indx>>...>::value))
595
- {
596
- ::cuda::std::__swallow(__tuple_leaf<_Indx, _Tp>::operator=(
597
- ::cuda::std::forward<__tuple_elem_at<_Tuple, _Indx>>(::cuda::std::get<_Indx>(__t)))...);
598
- return *this;
599
- }
600
-
601
- _CCCL_HIDE_FROM_ABI __tuple_impl(const __tuple_impl&) = default;
602
- _CCCL_HIDE_FROM_ABI __tuple_impl(__tuple_impl&&) = default;
603
- _CCCL_HIDE_FROM_ABI __tuple_impl& operator=(const __tuple_impl&) = default;
604
- _CCCL_HIDE_FROM_ABI __tuple_impl& operator=(__tuple_impl&&) = default;
605
-
606
- _CCCL_API inline void swap(__tuple_impl& __t) noexcept(__all<is_nothrow_swappable_v<_Tp>...>::value)
607
- {
608
- ::cuda::std::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t))...);
609
- }
610
- };
611
-
612
- struct __invalid_tuple_constraints
613
- {
614
- static constexpr bool __implicit_constructible = false;
615
- static constexpr bool __explicit_constructible = false;
616
- static constexpr bool __nothrow_constructible = false;
617
- };
618
-
619
- template <class... _Tp>
620
- struct __tuple_constraints
621
- {
622
- static constexpr bool __implicit_default_constructible =
623
- __all<__is_implicitly_default_constructible<_Tp>::value...>::value;
624
-
625
- static constexpr bool __explicit_default_constructible =
626
- !__implicit_default_constructible && __all<is_default_constructible_v<_Tp>...>::value;
627
-
628
- static constexpr bool __nothrow_default_constructible = __all<is_nothrow_default_constructible_v<_Tp>...>::value;
629
-
630
- static constexpr bool __implicit_variadic_copy_constructible =
631
- __tuple_constructible<tuple<const _Tp&...>, tuple<_Tp...>>::value
632
- && __tuple_convertible<tuple<const _Tp&...>, tuple<_Tp...>>::value;
633
-
634
- static constexpr bool __explicit_variadic_copy_constructible =
635
- __tuple_constructible<tuple<const _Tp&...>, tuple<_Tp...>>::value
636
- && !__tuple_convertible<tuple<const _Tp&...>, tuple<_Tp...>>::value;
637
-
638
- static constexpr bool __nothrow_variadic_copy_constructible = __all<is_nothrow_copy_constructible_v<_Tp>...>::value;
639
-
640
- template <class... _Args>
641
- struct _PackExpandsToThisTuple : false_type
642
- {};
643
-
644
- template <class _Arg>
645
- struct _PackExpandsToThisTuple<_Arg> : is_same<remove_cvref_t<_Arg>, tuple<_Tp...>>
646
- {};
647
-
648
- template <class... _Args>
649
- struct __variadic_constraints
650
- {
651
- static constexpr bool __implicit_constructible =
652
- __tuple_constructible<tuple<_Args...>, tuple<_Tp...>>::value
653
- && __tuple_convertible<tuple<_Args...>, tuple<_Tp...>>::value;
654
-
655
- static constexpr bool __explicit_constructible =
656
- __tuple_constructible<tuple<_Args...>, tuple<_Tp...>>::value
657
- && !__tuple_convertible<tuple<_Args...>, tuple<_Tp...>>::value;
658
-
659
- static constexpr bool __nothrow_constructible = __all<is_nothrow_constructible_v<_Tp, _Args>...>::value;
660
- };
661
-
662
- template <class... _Args>
663
- struct __variadic_constraints_less_rank
664
- {
665
- static constexpr bool __implicit_constructible =
666
- __tuple_constructible<tuple<_Args...>, __make_tuple_types_t<tuple<_Tp...>, sizeof...(_Args)>>::value
667
- && __tuple_convertible<tuple<_Args...>, __make_tuple_types_t<tuple<_Tp...>, sizeof...(_Args)>>::value
668
- && __all_default_constructible<__make_tuple_types_t<tuple<_Tp...>, sizeof...(_Tp), sizeof...(_Args)>>::value;
669
-
670
- static constexpr bool __explicit_constructible =
671
- __tuple_constructible<tuple<_Args...>, __make_tuple_types_t<tuple<_Tp...>, sizeof...(_Args)>>::value
672
- && !__tuple_convertible<tuple<_Args...>, __make_tuple_types_t<tuple<_Tp...>, sizeof...(_Args)>>::value
673
- && __all_default_constructible<__make_tuple_types_t<tuple<_Tp...>, sizeof...(_Tp), sizeof...(_Args)>>::value;
674
- };
675
-
676
- template <class _Tuple>
677
- struct __valid_tuple_like_constraints
678
- {
679
- static constexpr bool __implicit_constructible =
680
- __tuple_constructible<_Tuple, tuple<_Tp...>>::value && __tuple_convertible<_Tuple, tuple<_Tp...>>::value;
681
-
682
- static constexpr bool __explicit_constructible =
683
- __tuple_constructible<_Tuple, tuple<_Tp...>>::value && !__tuple_convertible<_Tuple, tuple<_Tp...>>::value;
684
- };
685
-
686
- template <class _Tuple>
687
- struct __valid_tuple_like_constraints_rank_one
688
- {
689
- template <class _Tuple2>
690
- struct _PreferTupleLikeConstructorImpl
691
- : _Or<
692
- // Don't attempt the two checks below if the tuple we are given
693
- // has the same type as this tuple.
694
- _IsSame<remove_cvref_t<_Tuple2>, tuple<_Tp...>>,
695
- _Lazy<_And, _Not<is_constructible<_Tp..., _Tuple2>>, _Not<is_convertible<_Tuple2, _Tp...>>>>
696
- {};
697
-
698
- // This trait is used to disable the tuple-like constructor when
699
- // the UTypes... constructor should be selected instead.
700
- // See LWG issue #2549.
701
- template <class _Tuple2>
702
- using _PreferTupleLikeConstructor = _PreferTupleLikeConstructorImpl<_Tuple2>;
703
-
704
- static constexpr bool __implicit_constructible =
705
- __tuple_constructible<_Tuple, tuple<_Tp...>>::value && __tuple_convertible<_Tuple, tuple<_Tp...>>::value
706
- && _PreferTupleLikeConstructor<_Tuple>::value;
707
-
708
- static constexpr bool __explicit_constructible =
709
- __tuple_constructible<_Tuple, tuple<_Tp...>>::value && !__tuple_convertible<_Tuple, tuple<_Tp...>>::value
710
- && _PreferTupleLikeConstructor<_Tuple>::value;
711
- };
712
-
713
- template <class _Tuple>
714
- using __tuple_like_constraints =
715
- _If<sizeof...(_Tp) == 1, __valid_tuple_like_constraints_rank_one<_Tuple>, __valid_tuple_like_constraints<_Tuple>>;
716
- };
717
-
718
- template <class... _Tp>
719
- class _CCCL_TYPE_VISIBILITY_DEFAULT tuple
720
- {
721
- using _BaseT = __tuple_impl<__make_tuple_indices_t<sizeof...(_Tp)>, _Tp...>;
722
-
723
- _BaseT __base_;
724
-
725
- template <class... _Args>
726
- struct _PackExpandsToThisTuple : false_type
727
- {};
728
-
729
- template <class _Arg>
730
- struct _PackExpandsToThisTuple<_Arg> : is_same<remove_cvref_t<_Arg>, tuple>
731
- {};
732
-
733
- public:
734
- template <size_t _Ip>
735
- _CCCL_API constexpr tuple_element_t<_Ip, tuple>& __get_impl() & noexcept
736
- {
737
- using type _CCCL_NODEBUG_ALIAS = tuple_element_t<_Ip, tuple>;
738
- return static_cast<__tuple_leaf<_Ip, type>&>(__base_).get();
739
- }
740
-
741
- template <size_t _Ip>
742
- _CCCL_API constexpr const tuple_element_t<_Ip, tuple>& __get_impl() const& noexcept
743
- {
744
- using type _CCCL_NODEBUG_ALIAS = tuple_element_t<_Ip, tuple>;
745
- return static_cast<const __tuple_leaf<_Ip, type>&>(__base_).get();
746
- }
747
-
748
- template <size_t _Ip>
749
- _CCCL_API constexpr tuple_element_t<_Ip, tuple>&& __get_impl() && noexcept
750
- {
751
- using type _CCCL_NODEBUG_ALIAS = tuple_element_t<_Ip, tuple>;
752
- return static_cast<type&&>(static_cast<__tuple_leaf<_Ip, type>&&>(__base_).get());
753
- }
754
-
755
- template <size_t _Ip>
756
- _CCCL_API constexpr const tuple_element_t<_Ip, tuple>&& __get_impl() const&& noexcept
757
- {
758
- using type _CCCL_NODEBUG_ALIAS = tuple_element_t<_Ip, tuple>;
759
- return static_cast<const type&&>(static_cast<const __tuple_leaf<_Ip, type>&&>(__base_).get());
760
- }
761
-
762
- template <class _Constraints = __tuple_constraints<_Tp...>,
763
- enable_if_t<_Constraints::__implicit_default_constructible, int> = 0>
764
- _CCCL_API constexpr tuple() noexcept(_Constraints::__nothrow_default_constructible)
765
- {}
766
-
767
- template <class _Constraints = __tuple_constraints<_Tp...>,
768
- enable_if_t<_Constraints::__explicit_default_constructible, int> = 0>
769
- _CCCL_API explicit constexpr tuple() noexcept(_Constraints::__nothrow_default_constructible)
770
- {}
771
-
772
- _CCCL_HIDE_FROM_ABI tuple(tuple const&) = default;
773
- _CCCL_HIDE_FROM_ABI tuple(tuple&&) = default;
774
-
775
- template <class _AllocArgT,
776
- class _Alloc,
777
- class _Constraints = __tuple_constraints<_Tp...>,
778
- enable_if_t<is_same_v<allocator_arg_t, _AllocArgT>, int> = 0,
779
- enable_if_t<_Constraints::__implicit_default_constructible, int> = 0>
780
- _CCCL_API inline tuple(_AllocArgT, _Alloc const& __a) noexcept(_Constraints::__nothrow_default_constructible)
781
- : __base_(allocator_arg_t(), __a)
782
- {}
783
-
784
- template <class _AllocArgT,
785
- class _Alloc,
786
- class _Constraints = __tuple_constraints<_Tp...>,
787
- enable_if_t<is_same_v<allocator_arg_t, _AllocArgT>, int> = 0,
788
- enable_if_t<_Constraints::__explicit_default_constructible, int> = 0>
789
- explicit _CCCL_API inline tuple(_AllocArgT, _Alloc const& __a) noexcept(_Constraints::__nothrow_default_constructible)
790
- : __base_(allocator_arg_t(), __a)
791
- {}
792
-
793
- template <class _Constraints = __tuple_constraints<_Tp...>,
794
- enable_if_t<_Constraints::__implicit_variadic_copy_constructible, int> = 0>
795
- _CCCL_API constexpr tuple(const _Tp&... __t) noexcept(_Constraints::__nothrow_variadic_copy_constructible)
796
- : __base_(__tuple_variadic_constructor_tag{}, __t...)
797
- {}
798
-
799
- template <class _Constraints = __tuple_constraints<_Tp...>,
800
- enable_if_t<_Constraints::__explicit_variadic_copy_constructible, int> = 0>
801
- _CCCL_API constexpr explicit tuple(const _Tp&... __t) noexcept(_Constraints::__nothrow_variadic_copy_constructible)
802
- : __base_(__tuple_variadic_constructor_tag{}, __t...)
803
- {}
804
-
805
- template <class _Alloc,
806
- class _Constraints = __tuple_constraints<_Tp...>,
807
- enable_if_t<_Constraints::__implicit_variadic_copy_constructible, int> = 0>
808
- _CCCL_API inline tuple(allocator_arg_t, const _Alloc& __a, const _Tp&... __t) noexcept(
809
- _Constraints::__nothrow_variadic_copy_constructible)
810
- : __base_(allocator_arg_t(), __a, __tuple_variadic_constructor_tag{}, __t...)
811
- {}
812
-
813
- template <class _Alloc,
814
- class _Constraints = __tuple_constraints<_Tp...>,
815
- enable_if_t<_Constraints::__explicit_variadic_copy_constructible, int> = 0>
816
- _CCCL_API inline explicit tuple(allocator_arg_t, const _Alloc& __a, const _Tp&... __t) noexcept(
817
- _Constraints::__nothrow_variadic_copy_constructible)
818
- : __base_(allocator_arg_t(), __a, __tuple_variadic_constructor_tag{}, __t...)
819
- {}
820
-
821
- template <class... _Up>
822
- using __variadic_constraints =
823
- _If<!_PackExpandsToThisTuple<_Up...>::value && sizeof...(_Up) == sizeof...(_Tp),
824
- typename __tuple_constraints<_Tp...>::template __variadic_constraints<_Up...>,
825
- __invalid_tuple_constraints>;
826
-
827
- template <class... _Up,
828
- class _Constraints = __variadic_constraints<_Up...>,
829
- enable_if_t<_Constraints::__implicit_constructible, int> = 0>
830
- _CCCL_API constexpr tuple(_Up&&... __u) noexcept(_Constraints::__nothrow_constructible)
831
- : __base_(__tuple_variadic_constructor_tag{}, ::cuda::std::forward<_Up>(__u)...)
832
- {}
833
-
834
- template <class... _Up,
835
- class _Constraints = __variadic_constraints<_Up...>,
836
- enable_if_t<_Constraints::__explicit_constructible, int> = 0>
837
- _CCCL_API constexpr explicit tuple(_Up&&... __u) noexcept(_Constraints::__nothrow_constructible)
838
- : __base_(__tuple_variadic_constructor_tag{}, ::cuda::std::forward<_Up>(__u)...)
839
- {}
840
-
841
- template <class... _Up>
842
- using __variadic_constraints_less_rank =
843
- _If<!_PackExpandsToThisTuple<_Up...>::value,
844
- typename __tuple_constraints<_Tp...>::template __variadic_constraints_less_rank<_Up...>,
845
- __invalid_tuple_constraints>;
846
-
847
- template <class... _Up,
848
- class _Constraints = __variadic_constraints_less_rank<_Up...>,
849
- enable_if_t<sizeof...(_Up) < sizeof...(_Tp), int> = 0,
850
- enable_if_t<_Constraints::__implicit_constructible, int> = 0>
851
- _CCCL_API constexpr explicit tuple(_Up&&... __u) noexcept(is_nothrow_constructible_v<_BaseT, _Up...>)
852
- : __base_(__tuple_variadic_constructor_tag{}, ::cuda::std::forward<_Up>(__u)...)
853
- {}
854
-
855
- template <class _Alloc,
856
- class... _Up,
857
- class _Constraints = __variadic_constraints<_Up...>,
858
- enable_if_t<_Constraints::__implicit_constructible, int> = 0>
859
- _CCCL_API inline tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u) noexcept(
860
- _Constraints::__nothrow_constructible)
861
- : __base_(allocator_arg_t(), __a, __tuple_variadic_constructor_tag{}, ::cuda::std::forward<_Up>(__u)...)
862
- {}
863
-
864
- template <class _Alloc,
865
- class... _Up,
866
- class _Constraints = __variadic_constraints<_Up...>,
867
- enable_if_t<_Constraints::__explicit_constructible, int> = 0>
868
- _CCCL_API inline explicit tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u) noexcept(
869
- _Constraints::__nothrow_constructible)
870
- : __base_(allocator_arg_t(), __a, __tuple_variadic_constructor_tag{}, ::cuda::std::forward<_Up>(__u)...)
871
- {}
872
-
873
- template <class _Tuple>
874
- using __tuple_like_constraints =
875
- _If<__tuple_like_with_size<_Tuple, sizeof...(_Tp)>::value,
876
- typename __tuple_constraints<_Tp...>::template __tuple_like_constraints<_Tuple>,
877
- __invalid_tuple_constraints>;
878
-
879
- // Horrible hack to make tuple_of_iterator_references work
880
- template <class _TupleOfIteratorReferences,
881
- enable_if_t<__is_tuple_of_iterator_references<_TupleOfIteratorReferences>::value, int> = 0,
882
- enable_if_t<(tuple_size<_TupleOfIteratorReferences>::value == sizeof...(_Tp)), int> = 0>
883
- _CCCL_API constexpr tuple(_TupleOfIteratorReferences&& __t)
884
- : tuple(::cuda::std::forward<_TupleOfIteratorReferences>(__t),
885
- typename __make_tuple_indices<sizeof...(_Tp)>::type{})
886
- {}
887
-
888
- private:
889
- template <class _TupleOfIteratorReferences,
890
- size_t... _Indices,
891
- enable_if_t<__is_tuple_of_iterator_references<_TupleOfIteratorReferences>::value, int> = 0>
892
- _CCCL_API constexpr tuple(_TupleOfIteratorReferences&& __t, __tuple_indices<_Indices...>)
893
- : tuple(::cuda::std::get<_Indices>(::cuda::std::forward<_TupleOfIteratorReferences>(__t))...)
894
- {}
895
-
896
- public:
897
- template <class _Tuple,
898
- class _Constraints = __tuple_like_constraints<_Tuple>,
899
- enable_if_t<!_PackExpandsToThisTuple<_Tuple>::value, int> = 0,
900
- enable_if_t<!is_lvalue_reference_v<_Tuple>, int> = 0,
901
- enable_if_t<_Constraints::__implicit_constructible, int> = 0>
902
- _CCCL_API constexpr tuple(_Tuple&& __t) noexcept(is_nothrow_constructible_v<_BaseT, _Tuple>)
903
- : __base_(::cuda::std::forward<_Tuple>(__t))
904
- {}
905
-
906
- template <class _Tuple,
907
- class _Constraints = __tuple_like_constraints<const _Tuple&>,
908
- enable_if_t<!_PackExpandsToThisTuple<_Tuple>::value, int> = 0,
909
- enable_if_t<_Constraints::__implicit_constructible, int> = 0>
910
- _CCCL_API constexpr tuple(const _Tuple& __t) noexcept(is_nothrow_constructible_v<_BaseT, const _Tuple&>)
911
- : __base_(__t)
912
- {}
913
-
914
- template <class _Tuple,
915
- class _Constraints = __tuple_like_constraints<_Tuple>,
916
- enable_if_t<!_PackExpandsToThisTuple<_Tuple>::value, int> = 0,
917
- enable_if_t<!is_lvalue_reference_v<_Tuple>, int> = 0,
918
- enable_if_t<_Constraints::__explicit_constructible, int> = 0>
919
- _CCCL_API constexpr explicit tuple(_Tuple&& __t) noexcept(is_nothrow_constructible_v<_BaseT, _Tuple>)
920
- : __base_(::cuda::std::forward<_Tuple>(__t))
921
- {}
922
-
923
- template <class _Tuple,
924
- class _Constraints = __tuple_like_constraints<const _Tuple&>,
925
- enable_if_t<!_PackExpandsToThisTuple<_Tuple>::value, int> = 0,
926
- enable_if_t<_Constraints::__explicit_constructible, int> = 0>
927
- _CCCL_API constexpr explicit tuple(const _Tuple& __t) noexcept(is_nothrow_constructible_v<_BaseT, const _Tuple&>)
928
- : __base_(__t)
929
- {}
930
-
931
- template <class _Alloc,
932
- class _Tuple,
933
- class _Constraints = __tuple_like_constraints<_Tuple>,
934
- enable_if_t<_Constraints::__implicit_constructible, int> = 0>
935
- _CCCL_API inline tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
936
- : __base_(allocator_arg_t(), __a, ::cuda::std::forward<_Tuple>(__t))
937
- {}
938
-
939
- template <class _Alloc,
940
- class _Tuple,
941
- class _Constraints = __tuple_like_constraints<_Tuple>,
942
- enable_if_t<_Constraints::__explicit_constructible, int> = 0>
943
- _CCCL_API inline explicit tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
944
- : __base_(allocator_arg_t(), __a, ::cuda::std::forward<_Tuple>(__t))
945
- {}
946
-
947
- using _CanCopyAssign = __all<is_copy_assignable_v<_Tp>...>;
948
- using _CanMoveAssign = __all<is_move_assignable_v<_Tp>...>;
949
-
950
- _CCCL_HIDE_FROM_ABI tuple& operator=(const tuple& __t) = default;
951
- _CCCL_HIDE_FROM_ABI tuple& operator=(tuple&& __t) = default;
952
-
953
- template <class _Tuple, enable_if_t<__tuple_assignable<_Tuple, tuple>::value, bool> = false>
954
- _CCCL_API inline tuple& operator=(_Tuple&& __t) noexcept(is_nothrow_assignable_v<_BaseT&, _Tuple>)
955
- {
956
- __base_.operator=(::cuda::std::forward<_Tuple>(__t));
957
- return *this;
958
- }
959
-
960
- _CCCL_API inline void swap(tuple& __t) noexcept(__all<is_nothrow_swappable_v<_Tp>...>::value)
961
- {
962
- __base_.swap(__t.__base_);
963
- }
964
- };
965
-
966
- template <>
967
- class _CCCL_TYPE_VISIBILITY_DEFAULT tuple<>
968
- {
969
- public:
970
- _CCCL_HIDE_FROM_ABI constexpr tuple() noexcept = default;
971
- template <class _Alloc>
972
- _CCCL_API inline tuple(allocator_arg_t, const _Alloc&) noexcept
973
- {}
974
- template <class _Alloc>
975
- _CCCL_API inline tuple(allocator_arg_t, const _Alloc&, const tuple&) noexcept
976
- {}
977
- template <class _Up>
978
- _CCCL_API inline tuple(array<_Up, 0>) noexcept
979
- {}
980
- template <class _Alloc, class _Up>
981
- _CCCL_API inline tuple(allocator_arg_t, const _Alloc&, array<_Up, 0>) noexcept
982
- {}
983
- _CCCL_API inline void swap(tuple&) noexcept {}
984
- };
985
-
986
- template <class... _Tp>
987
- _CCCL_HOST_DEVICE tuple(_Tp...) -> tuple<_Tp...>;
988
- template <class _Tp1, class _Tp2>
989
- _CCCL_HOST_DEVICE tuple(pair<_Tp1, _Tp2>) -> tuple<_Tp1, _Tp2>;
990
- template <class _Alloc, class... _Tp>
991
- _CCCL_HOST_DEVICE tuple(allocator_arg_t, _Alloc, _Tp...) -> tuple<_Tp...>;
992
- template <class _Alloc, class _Tp1, class _Tp2>
993
- _CCCL_HOST_DEVICE tuple(allocator_arg_t, _Alloc, pair<_Tp1, _Tp2>) -> tuple<_Tp1, _Tp2>;
994
- template <class _Alloc, class... _Tp>
995
- _CCCL_HOST_DEVICE tuple(allocator_arg_t, _Alloc, tuple<_Tp...>) -> tuple<_Tp...>;
996
-
997
- template <class... _Tp>
998
- _CCCL_API inline enable_if_t<__all<is_nothrow_swappable_v<_Tp>...>::value, void>
999
- swap(tuple<_Tp...>& __t, tuple<_Tp...>& __u) noexcept(__all<is_nothrow_swappable_v<_Tp>...>::value)
1000
- {
1001
- __t.swap(__u);
1002
- }
1003
-
1004
- // get
1005
- template <size_t _Ip, class... _Tp>
1006
- _CCCL_API constexpr tuple_element_t<_Ip, tuple<_Tp...>>& get(tuple<_Tp...>& __t) noexcept
1007
- {
1008
- return __t.template __get_impl<_Ip>();
1009
- }
1010
-
1011
- template <size_t _Ip, class... _Tp>
1012
- _CCCL_API constexpr const tuple_element_t<_Ip, tuple<_Tp...>>& get(const tuple<_Tp...>& __t) noexcept
1013
- {
1014
- return __t.template __get_impl<_Ip>();
1015
- }
1016
-
1017
- template <size_t _Ip, class... _Tp>
1018
- _CCCL_API constexpr tuple_element_t<_Ip, tuple<_Tp...>>&& get(tuple<_Tp...>&& __t) noexcept
1019
- {
1020
- return ::cuda::std::move(__t).template __get_impl<_Ip>();
1021
- }
1022
-
1023
- template <size_t _Ip, class... _Tp>
1024
- _CCCL_API constexpr const tuple_element_t<_Ip, tuple<_Tp...>>&& get(const tuple<_Tp...>&& __t) noexcept
1025
- {
1026
- return ::cuda::std::move(__t).template __get_impl<_Ip>();
1027
- }
1028
-
1029
- namespace __find_detail
1030
- {
1031
-
1032
- static constexpr size_t __not_found = ~size_t(0);
1033
- static constexpr size_t __ambiguous = __not_found - 1;
1034
-
1035
- _CCCL_API constexpr size_t __find_idx_return(size_t __curr_i, size_t __res, bool __matches)
1036
- {
1037
- return !__matches ? __res : (__res == __not_found ? __curr_i : __ambiguous);
1038
- }
1039
-
1040
- template <size_t _Nx>
1041
- _CCCL_API constexpr size_t __find_idx(size_t __i, const bool (&__matches)[_Nx])
1042
- {
1043
- return __i == _Nx ? __not_found : __find_idx_return(__i, __find_idx(__i + 1, __matches), __matches[__i]);
1044
- }
1045
-
1046
- template <class _T1, class... _Args>
1047
- struct __find_exactly_one_checked
1048
- {
1049
- static constexpr bool __matches[sizeof...(_Args)] = {is_same_v<_T1, _Args>...};
1050
- static constexpr size_t value = __find_detail::__find_idx(0, __matches);
1051
- static_assert(value != __not_found, "type not found in type list");
1052
- static_assert(value != __ambiguous, "type occurs more than once in type list");
1053
- };
1054
-
1055
- template <class _T1>
1056
- struct __find_exactly_one_checked<_T1>
1057
- {
1058
- static_assert(!is_same_v<_T1, _T1>, "type not in empty type list");
1059
- };
1060
-
1061
- } // namespace __find_detail
1062
-
1063
- template <typename _T1, typename... _Args>
1064
- struct __find_exactly_one_t : public __find_detail::__find_exactly_one_checked<_T1, _Args...>
1065
- {};
1066
-
1067
- template <class _T1, class... _Args>
1068
- _CCCL_API constexpr _T1& get(tuple<_Args...>& __tup) noexcept
1069
- {
1070
- return ::cuda::std::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup);
1071
- }
1072
-
1073
- template <class _T1, class... _Args>
1074
- _CCCL_API constexpr _T1 const& get(tuple<_Args...> const& __tup) noexcept
1075
- {
1076
- return ::cuda::std::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup);
1077
- }
1078
-
1079
- template <class _T1, class... _Args>
1080
- _CCCL_API constexpr _T1&& get(tuple<_Args...>&& __tup) noexcept
1081
- {
1082
- return ::cuda::std::get<__find_exactly_one_t<_T1, _Args...>::value>(::cuda::std::move(__tup));
1083
- }
1084
-
1085
- template <class _T1, class... _Args>
1086
- _CCCL_API constexpr _T1 const&& get(tuple<_Args...> const&& __tup) noexcept
1087
- {
1088
- return ::cuda::std::get<__find_exactly_one_t<_T1, _Args...>::value>(::cuda::std::move(__tup));
1089
- }
1090
-
1091
- // tie
1092
-
1093
- template <class... _Tp>
1094
- _CCCL_API constexpr tuple<_Tp&...> tie(_Tp&... __t) noexcept
1095
- {
1096
- return tuple<_Tp&...>(__t...);
1097
- }
1098
-
1099
- template <class... _Tp>
1100
- _CCCL_API constexpr tuple<unwrap_ref_decay_t<_Tp>...> make_tuple(_Tp&&... __t)
1101
- {
1102
- return tuple<unwrap_ref_decay_t<_Tp>...>(::cuda::std::forward<_Tp>(__t)...);
1103
- }
1104
-
1105
- template <class... _Tp>
1106
- _CCCL_API constexpr tuple<_Tp&&...> forward_as_tuple(_Tp&&... __t) noexcept
1107
- {
1108
- return tuple<_Tp&&...>(::cuda::std::forward<_Tp>(__t)...);
1109
- }
1110
-
1111
- template <size_t _Ip>
1112
- struct __tuple_equal
1113
- {
1114
- _CCCL_EXEC_CHECK_DISABLE
1115
- template <class _Tp, class _Up>
1116
- _CCCL_API constexpr bool operator()(const _Tp& __x, const _Up& __y)
1117
- {
1118
- return __tuple_equal<_Ip - 1>()(__x, __y) && ::cuda::std::get<_Ip - 1>(__x) == ::cuda::std::get<_Ip - 1>(__y);
1119
- }
1120
- };
1121
-
1122
- template <>
1123
- struct __tuple_equal<0>
1124
- {
1125
- template <class _Tp, class _Up>
1126
- _CCCL_API constexpr bool operator()(const _Tp&, const _Up&)
1127
- {
1128
- return true;
1129
- }
1130
- };
1131
-
1132
- template <class... _Tp, class... _Up>
1133
- _CCCL_API constexpr bool operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1134
- {
1135
- static_assert(sizeof...(_Tp) == sizeof...(_Up), "Can't compare tuples of different sizes");
1136
- return __tuple_equal<sizeof...(_Tp)>()(__x, __y);
1137
- }
1138
-
1139
- template <class... _Tp, class... _Up>
1140
- _CCCL_API constexpr bool operator!=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1141
- {
1142
- return !(__x == __y);
1143
- }
1144
-
1145
- template <size_t _Ip>
1146
- struct __tuple_less
1147
- {
1148
- _CCCL_EXEC_CHECK_DISABLE
1149
- template <class _Tp, class _Up>
1150
- _CCCL_API constexpr bool operator()(const _Tp& __x, const _Up& __y)
1151
- {
1152
- const size_t __idx = tuple_size<_Tp>::value - _Ip;
1153
- if (::cuda::std::get<__idx>(__x) < ::cuda::std::get<__idx>(__y))
1154
- {
1155
- return true;
1156
- }
1157
- if (::cuda::std::get<__idx>(__y) < ::cuda::std::get<__idx>(__x))
1158
- {
1159
- return false;
1160
- }
1161
- return __tuple_less<_Ip - 1>()(__x, __y);
1162
- }
1163
- };
1164
-
1165
- template <>
1166
- struct __tuple_less<0>
1167
- {
1168
- template <class _Tp, class _Up>
1169
- _CCCL_API constexpr bool operator()(const _Tp&, const _Up&)
1170
- {
1171
- return false;
1172
- }
1173
- };
1174
-
1175
- template <class... _Tp, class... _Up>
1176
- _CCCL_API constexpr bool operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1177
- {
1178
- static_assert(sizeof...(_Tp) == sizeof...(_Up), "Can't compare tuples of different sizes");
1179
- return __tuple_less<sizeof...(_Tp)>()(__x, __y);
1180
- }
1181
-
1182
- template <class... _Tp, class... _Up>
1183
- _CCCL_API constexpr bool operator>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1184
- {
1185
- return __y < __x;
1186
- }
1187
-
1188
- template <class... _Tp, class... _Up>
1189
- _CCCL_API constexpr bool operator>=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1190
- {
1191
- return !(__x < __y);
1192
- }
1193
-
1194
- template <class... _Tp, class... _Up>
1195
- _CCCL_API constexpr bool operator<=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
1196
- {
1197
- return !(__y < __x);
1198
- }
1199
-
1200
- // tuple_cat
1201
-
1202
- template <class _Tp, class _Up>
1203
- struct __tuple_cat_type;
1204
-
1205
- template <class... _Ttypes, class... _Utypes>
1206
- struct __tuple_cat_type<tuple<_Ttypes...>, __tuple_types<_Utypes...>>
1207
- {
1208
- using type _CCCL_NODEBUG_ALIAS = tuple<_Ttypes..., _Utypes...>;
1209
- };
1210
-
1211
- template <class _ResultTuple, bool _Is_Tuple0TupleLike, class... _Tuples>
1212
- struct __tuple_cat_return_1
1213
- {};
1214
-
1215
- template <class... _Types, class _Tuple0>
1216
- struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0>
1217
- {
1218
- using type _CCCL_NODEBUG_ALIAS =
1219
- typename __tuple_cat_type<tuple<_Types...>, __make_tuple_types_t<remove_cvref_t<_Tuple0>>>::type;
1220
- };
1221
-
1222
- template <class... _Types, class _Tuple0, class _Tuple1, class... _Tuples>
1223
- struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0, _Tuple1, _Tuples...>
1224
- : public __tuple_cat_return_1<
1225
- typename __tuple_cat_type<tuple<_Types...>, __make_tuple_types_t<remove_cvref_t<_Tuple0>>>::type,
1226
- __tuple_like_impl<remove_reference_t<_Tuple1>>,
1227
- _Tuple1,
1228
- _Tuples...>
1229
- {};
1230
-
1231
- template <class... _Tuples>
1232
- struct __tuple_cat_return;
1233
-
1234
- template <class _Tuple0, class... _Tuples>
1235
- struct __tuple_cat_return<_Tuple0, _Tuples...>
1236
- : public __tuple_cat_return_1<tuple<>, __tuple_like_impl<remove_reference_t<_Tuple0>>, _Tuple0, _Tuples...>
1237
- {};
1238
-
1239
- template <>
1240
- struct __tuple_cat_return<>
1241
- {
1242
- using type _CCCL_NODEBUG_ALIAS = tuple<>;
1243
- };
1244
-
1245
- _CCCL_API constexpr tuple<> tuple_cat()
1246
- {
1247
- return tuple<>();
1248
- }
1249
-
1250
- template <class _Rp, class _Indices, class _Tuple0, class... _Tuples>
1251
- struct __tuple_cat_return_ref_imp;
1252
-
1253
- template <class... _Types, size_t... _I0, class _Tuple0>
1254
- struct __tuple_cat_return_ref_imp<tuple<_Types...>, __tuple_indices<_I0...>, _Tuple0>
1255
- {
1256
- using _T0 _CCCL_NODEBUG_ALIAS = remove_reference_t<_Tuple0>;
1257
- using type = tuple<_Types..., __copy_cvref_t<_Tuple0, tuple_element_t<_I0, _T0>>&&...>;
1258
- };
1259
-
1260
- template <class... _Types, size_t... _I0, class _Tuple0, class _Tuple1, class... _Tuples>
1261
- struct __tuple_cat_return_ref_imp<tuple<_Types...>, __tuple_indices<_I0...>, _Tuple0, _Tuple1, _Tuples...>
1262
- : public __tuple_cat_return_ref_imp<
1263
- tuple<_Types..., __copy_cvref_t<_Tuple0, tuple_element_t<_I0, remove_reference_t<_Tuple0>>>&&...>,
1264
- __make_tuple_indices_t<tuple_size<remove_reference_t<_Tuple1>>::value>,
1265
- _Tuple1,
1266
- _Tuples...>
1267
- {};
1268
-
1269
- template <class _Tuple0, class... _Tuples>
1270
- struct __tuple_cat_return_ref
1271
- : public __tuple_cat_return_ref_imp<tuple<>,
1272
- __make_tuple_indices_t<tuple_size<remove_reference_t<_Tuple0>>::value>,
1273
- _Tuple0,
1274
- _Tuples...>
1275
- {};
1276
-
1277
- template <class _Types, class _I0, class _J0>
1278
- struct __tuple_cat;
1279
-
1280
- template <class... _Types, size_t... _I0, size_t... _J0>
1281
- struct __tuple_cat<tuple<_Types...>, __tuple_indices<_I0...>, __tuple_indices<_J0...>>
1282
- {
1283
- template <class _Tuple0>
1284
- _CCCL_API constexpr typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&>::type
1285
- operator()([[maybe_unused]] tuple<_Types...> __t, _Tuple0&& __t0)
1286
- {
1287
- return ::cuda::std::forward_as_tuple(::cuda::std::forward<_Types>(::cuda::std::get<_I0>(__t))...,
1288
- ::cuda::std::get<_J0>(::cuda::std::forward<_Tuple0>(__t0))...);
1289
- }
1290
-
1291
- template <class _Tuple0, class _Tuple1, class... _Tuples>
1292
- _CCCL_API constexpr typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&, _Tuple1&&, _Tuples&&...>::type
1293
- operator()([[maybe_unused]] tuple<_Types...> __t, _Tuple0&& __t0, _Tuple1&& __t1, _Tuples&&... __tpls)
1294
- {
1295
- using _T0 _CCCL_NODEBUG_ALIAS = remove_reference_t<_Tuple0>;
1296
- using _T1 _CCCL_NODEBUG_ALIAS = remove_reference_t<_Tuple1>;
1297
- return __tuple_cat<tuple<_Types..., __copy_cvref_t<_Tuple0, tuple_element_t<_J0, _T0>>&&...>,
1298
- __make_tuple_indices_t<sizeof...(_Types) + tuple_size<_T0>::value>,
1299
- __make_tuple_indices_t<tuple_size<_T1>::value>>()(
1300
- ::cuda::std::forward_as_tuple(::cuda::std::forward<_Types>(::cuda::std::get<_I0>(__t))...,
1301
- ::cuda::std::get<_J0>(::cuda::std::forward<_Tuple0>(__t0))...),
1302
- ::cuda::std::forward<_Tuple1>(__t1),
1303
- ::cuda::std::forward<_Tuples>(__tpls)...);
1304
- }
1305
- };
1306
-
1307
- template <class _Tuple0, class... _Tuples>
1308
- _CCCL_API constexpr typename __tuple_cat_return<_Tuple0, _Tuples...>::type tuple_cat(_Tuple0&& __t0, _Tuples&&... __tpls)
1309
- {
1310
- using _T0 _CCCL_NODEBUG_ALIAS = remove_reference_t<_Tuple0>;
1311
- return __tuple_cat<tuple<>, __tuple_indices<>, __make_tuple_indices_t<tuple_size<_T0>::value>>()(
1312
- tuple<>(), ::cuda::std::forward<_Tuple0>(__t0), ::cuda::std::forward<_Tuples>(__tpls)...);
1313
- }
1314
-
1315
- template <class... _Tp, class _Alloc>
1316
- struct _CCCL_TYPE_VISIBILITY_DEFAULT uses_allocator<tuple<_Tp...>, _Alloc> : true_type
1317
- {};
1318
-
1319
- template <class _T1, class _T2, bool _IsRef>
1320
- template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
1321
- _CCCL_API inline _CCCL_CONSTEXPR_CXX20 __pair_base<_T1, _T2, _IsRef>::__pair_base(
1322
- piecewise_construct_t,
1323
- tuple<_Args1...>& __first_args,
1324
- tuple<_Args2...>& __second_args,
1325
- __tuple_indices<_I1...>,
1326
- __tuple_indices<_I2...>)
1327
- : first(::cuda::std::forward<_Args1>(::cuda::std::get<_I1>(__first_args))...)
1328
- , second(::cuda::std::forward<_Args2>(::cuda::std::get<_I2>(__second_args))...)
1329
- {}
1330
-
1331
- #define _LIBCUDACXX_NOEXCEPT_RETURN(...) \
1332
- noexcept(noexcept(__VA_ARGS__)) \
1333
- { \
1334
- return __VA_ARGS__; \
1335
- }
1336
-
1337
- template <class _Fn, class _Tuple, size_t... _Id>
1338
- _CCCL_API constexpr decltype(auto) __apply_tuple_impl(_Fn&& __f, _Tuple&& __t, __tuple_indices<_Id...>)
1339
- _LIBCUDACXX_NOEXCEPT_RETURN(
1340
- ::cuda::std::__invoke(::cuda::std::forward<_Fn>(__f), ::cuda::std::get<_Id>(::cuda::std::forward<_Tuple>(__t))...))
1341
-
1342
- template <class _Fn, class _Tuple>
1343
- _CCCL_API constexpr decltype(auto) apply(_Fn&& __f, _Tuple&& __t)
1344
- _LIBCUDACXX_NOEXCEPT_RETURN(::cuda::std::__apply_tuple_impl(
1345
- ::cuda::std::forward<_Fn>(__f),
1346
- ::cuda::std::forward<_Tuple>(__t),
1347
- __make_tuple_indices_t<tuple_size_v<remove_reference_t<_Tuple>>>{}))
1348
-
1349
- template <class _Tp, class _Tuple, size_t... _Idx>
1350
- _CCCL_API constexpr _Tp
1351
- __make_from_tuple_impl(_Tuple&& __t, __tuple_indices<_Idx...>)
1352
- _LIBCUDACXX_NOEXCEPT_RETURN(_Tp(::cuda::std::get<_Idx>(::cuda::std::forward<_Tuple>(__t))...))
1353
-
1354
- template <class _Tp, class _Tuple>
1355
- _CCCL_API constexpr _Tp
1356
- make_from_tuple(_Tuple&& __t) _LIBCUDACXX_NOEXCEPT_RETURN(::cuda::std::__make_from_tuple_impl<_Tp>(
1357
- ::cuda::std::forward<_Tuple>(__t), __make_tuple_indices_t<tuple_size_v<remove_reference_t<_Tuple>>>{}))
1358
-
1359
- #undef _LIBCUDACXX_NOEXCEPT_RETURN
1360
-
1361
- _CCCL_END_NAMESPACE_CUDA_STD
1362
-
1363
- #include <cuda/std/__cccl/epilogue.h>
1364
-
1365
- #endif // _LIBCUDACXX_TUPLE