cuda-cccl 0.1.3.1.0.dev1486__cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.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 (1819) hide show
  1. cuda/cccl/__init__.py +14 -0
  2. cuda/cccl/cooperative/__init__.py +3 -0
  3. cuda/cccl/cooperative/experimental/__init__.py +8 -0
  4. cuda/cccl/cooperative/experimental/_caching.py +48 -0
  5. cuda/cccl/cooperative/experimental/_common.py +276 -0
  6. cuda/cccl/cooperative/experimental/_nvrtc.py +91 -0
  7. cuda/cccl/cooperative/experimental/_scan_op.py +181 -0
  8. cuda/cccl/cooperative/experimental/_types.py +953 -0
  9. cuda/cccl/cooperative/experimental/_typing.py +107 -0
  10. cuda/cccl/cooperative/experimental/block/__init__.py +33 -0
  11. cuda/cccl/cooperative/experimental/block/_block_load_store.py +215 -0
  12. cuda/cccl/cooperative/experimental/block/_block_merge_sort.py +125 -0
  13. cuda/cccl/cooperative/experimental/block/_block_radix_sort.py +214 -0
  14. cuda/cccl/cooperative/experimental/block/_block_reduce.py +294 -0
  15. cuda/cccl/cooperative/experimental/block/_block_scan.py +983 -0
  16. cuda/cccl/cooperative/experimental/warp/__init__.py +9 -0
  17. cuda/cccl/cooperative/experimental/warp/_warp_merge_sort.py +98 -0
  18. cuda/cccl/cooperative/experimental/warp/_warp_reduce.py +153 -0
  19. cuda/cccl/cooperative/experimental/warp/_warp_scan.py +78 -0
  20. cuda/cccl/headers/__init__.py +7 -0
  21. cuda/cccl/headers/include/__init__.py +1 -0
  22. cuda/cccl/headers/include/cub/agent/agent_adjacent_difference.cuh +261 -0
  23. cuda/cccl/headers/include/cub/agent/agent_batch_memcpy.cuh +1181 -0
  24. cuda/cccl/headers/include/cub/agent/agent_for.cuh +84 -0
  25. cuda/cccl/headers/include/cub/agent/agent_histogram.cuh +919 -0
  26. cuda/cccl/headers/include/cub/agent/agent_merge.cuh +227 -0
  27. cuda/cccl/headers/include/cub/agent/agent_merge_sort.cuh +752 -0
  28. cuda/cccl/headers/include/cub/agent/agent_radix_sort_downsweep.cuh +766 -0
  29. cuda/cccl/headers/include/cub/agent/agent_radix_sort_histogram.cuh +286 -0
  30. cuda/cccl/headers/include/cub/agent/agent_radix_sort_onesweep.cuh +704 -0
  31. cuda/cccl/headers/include/cub/agent/agent_radix_sort_upsweep.cuh +557 -0
  32. cuda/cccl/headers/include/cub/agent/agent_reduce.cuh +678 -0
  33. cuda/cccl/headers/include/cub/agent/agent_reduce_by_key.cuh +804 -0
  34. cuda/cccl/headers/include/cub/agent/agent_rle.cuh +997 -0
  35. cuda/cccl/headers/include/cub/agent/agent_scan.cuh +561 -0
  36. cuda/cccl/headers/include/cub/agent/agent_scan_by_key.cuh +473 -0
  37. cuda/cccl/headers/include/cub/agent/agent_segmented_radix_sort.cuh +292 -0
  38. cuda/cccl/headers/include/cub/agent/agent_select_if.cuh +1032 -0
  39. cuda/cccl/headers/include/cub/agent/agent_sub_warp_merge_sort.cuh +342 -0
  40. cuda/cccl/headers/include/cub/agent/agent_three_way_partition.cuh +592 -0
  41. cuda/cccl/headers/include/cub/agent/agent_unique_by_key.cuh +614 -0
  42. cuda/cccl/headers/include/cub/agent/single_pass_scan_operators.cuh +1346 -0
  43. cuda/cccl/headers/include/cub/block/block_adjacent_difference.cuh +965 -0
  44. cuda/cccl/headers/include/cub/block/block_discontinuity.cuh +1217 -0
  45. cuda/cccl/headers/include/cub/block/block_exchange.cuh +1306 -0
  46. cuda/cccl/headers/include/cub/block/block_histogram.cuh +420 -0
  47. cuda/cccl/headers/include/cub/block/block_load.cuh +1259 -0
  48. cuda/cccl/headers/include/cub/block/block_merge_sort.cuh +787 -0
  49. cuda/cccl/headers/include/cub/block/block_radix_rank.cuh +1218 -0
  50. cuda/cccl/headers/include/cub/block/block_radix_sort.cuh +2193 -0
  51. cuda/cccl/headers/include/cub/block/block_raking_layout.cuh +150 -0
  52. cuda/cccl/headers/include/cub/block/block_reduce.cuh +629 -0
  53. cuda/cccl/headers/include/cub/block/block_run_length_decode.cuh +437 -0
  54. cuda/cccl/headers/include/cub/block/block_scan.cuh +2600 -0
  55. cuda/cccl/headers/include/cub/block/block_shuffle.cuh +346 -0
  56. cuda/cccl/headers/include/cub/block/block_store.cuh +1246 -0
  57. cuda/cccl/headers/include/cub/block/radix_rank_sort_operations.cuh +620 -0
  58. cuda/cccl/headers/include/cub/block/specializations/block_histogram_atomic.cuh +86 -0
  59. cuda/cccl/headers/include/cub/block/specializations/block_histogram_sort.cuh +240 -0
  60. cuda/cccl/headers/include/cub/block/specializations/block_reduce_raking.cuh +252 -0
  61. cuda/cccl/headers/include/cub/block/specializations/block_reduce_raking_commutative_only.cuh +238 -0
  62. cuda/cccl/headers/include/cub/block/specializations/block_reduce_warp_reductions.cuh +259 -0
  63. cuda/cccl/headers/include/cub/block/specializations/block_scan_raking.cuh +790 -0
  64. cuda/cccl/headers/include/cub/block/specializations/block_scan_warp_scans.cuh +538 -0
  65. cuda/cccl/headers/include/cub/config.cuh +60 -0
  66. cuda/cccl/headers/include/cub/cub.cuh +112 -0
  67. cuda/cccl/headers/include/cub/detail/array_utils.cuh +77 -0
  68. cuda/cccl/headers/include/cub/detail/choose_offset.cuh +155 -0
  69. cuda/cccl/headers/include/cub/detail/detect_cuda_runtime.cuh +93 -0
  70. cuda/cccl/headers/include/cub/detail/device_double_buffer.cuh +96 -0
  71. cuda/cccl/headers/include/cub/detail/fast_modulo_division.cuh +246 -0
  72. cuda/cccl/headers/include/cub/detail/launcher/cuda_driver.cuh +120 -0
  73. cuda/cccl/headers/include/cub/detail/launcher/cuda_runtime.cuh +74 -0
  74. cuda/cccl/headers/include/cub/detail/mdspan_utils.cuh +118 -0
  75. cuda/cccl/headers/include/cub/detail/ptx-json/README.md +71 -0
  76. cuda/cccl/headers/include/cub/detail/ptx-json/array.h +68 -0
  77. cuda/cccl/headers/include/cub/detail/ptx-json/json.h +61 -0
  78. cuda/cccl/headers/include/cub/detail/ptx-json/object.h +100 -0
  79. cuda/cccl/headers/include/cub/detail/ptx-json/string.h +71 -0
  80. cuda/cccl/headers/include/cub/detail/ptx-json/value.h +93 -0
  81. cuda/cccl/headers/include/cub/detail/ptx-json-parser.h +63 -0
  82. cuda/cccl/headers/include/cub/detail/rfa.cuh +724 -0
  83. cuda/cccl/headers/include/cub/detail/strong_load.cuh +189 -0
  84. cuda/cccl/headers/include/cub/detail/strong_store.cuh +220 -0
  85. cuda/cccl/headers/include/cub/detail/temporary_storage.cuh +355 -0
  86. cuda/cccl/headers/include/cub/detail/type_traits.cuh +206 -0
  87. cuda/cccl/headers/include/cub/detail/uninitialized_copy.cuh +72 -0
  88. cuda/cccl/headers/include/cub/detail/unsafe_bitcast.cuh +56 -0
  89. cuda/cccl/headers/include/cub/device/device_adjacent_difference.cuh +596 -0
  90. cuda/cccl/headers/include/cub/device/device_copy.cuh +187 -0
  91. cuda/cccl/headers/include/cub/device/device_for.cuh +994 -0
  92. cuda/cccl/headers/include/cub/device/device_histogram.cuh +1507 -0
  93. cuda/cccl/headers/include/cub/device/device_memcpy.cuh +195 -0
  94. cuda/cccl/headers/include/cub/device/device_merge.cuh +202 -0
  95. cuda/cccl/headers/include/cub/device/device_merge_sort.cuh +979 -0
  96. cuda/cccl/headers/include/cub/device/device_partition.cuh +664 -0
  97. cuda/cccl/headers/include/cub/device/device_radix_sort.cuh +3431 -0
  98. cuda/cccl/headers/include/cub/device/device_reduce.cuh +1387 -0
  99. cuda/cccl/headers/include/cub/device/device_run_length_encode.cuh +368 -0
  100. cuda/cccl/headers/include/cub/device/device_scan.cuh +1901 -0
  101. cuda/cccl/headers/include/cub/device/device_segmented_radix_sort.cuh +1496 -0
  102. cuda/cccl/headers/include/cub/device/device_segmented_reduce.cuh +1512 -0
  103. cuda/cccl/headers/include/cub/device/device_segmented_sort.cuh +2811 -0
  104. cuda/cccl/headers/include/cub/device/device_select.cuh +1224 -0
  105. cuda/cccl/headers/include/cub/device/device_transform.cuh +313 -0
  106. cuda/cccl/headers/include/cub/device/dispatch/dispatch_adjacent_difference.cuh +314 -0
  107. cuda/cccl/headers/include/cub/device/dispatch/dispatch_advance_iterators.cuh +109 -0
  108. cuda/cccl/headers/include/cub/device/dispatch/dispatch_batch_memcpy.cuh +718 -0
  109. cuda/cccl/headers/include/cub/device/dispatch/dispatch_common.cuh +45 -0
  110. cuda/cccl/headers/include/cub/device/dispatch/dispatch_for.cuh +197 -0
  111. cuda/cccl/headers/include/cub/device/dispatch/dispatch_histogram.cuh +1051 -0
  112. cuda/cccl/headers/include/cub/device/dispatch/dispatch_merge.cuh +305 -0
  113. cuda/cccl/headers/include/cub/device/dispatch/dispatch_merge_sort.cuh +473 -0
  114. cuda/cccl/headers/include/cub/device/dispatch/dispatch_radix_sort.cuh +1748 -0
  115. cuda/cccl/headers/include/cub/device/dispatch/dispatch_reduce.cuh +1316 -0
  116. cuda/cccl/headers/include/cub/device/dispatch/dispatch_reduce_by_key.cuh +625 -0
  117. cuda/cccl/headers/include/cub/device/dispatch/dispatch_reduce_deterministic.cuh +502 -0
  118. cuda/cccl/headers/include/cub/device/dispatch/dispatch_rle.cuh +548 -0
  119. cuda/cccl/headers/include/cub/device/dispatch/dispatch_scan.cuh +497 -0
  120. cuda/cccl/headers/include/cub/device/dispatch/dispatch_scan_by_key.cuh +598 -0
  121. cuda/cccl/headers/include/cub/device/dispatch/dispatch_segmented_sort.cuh +1374 -0
  122. cuda/cccl/headers/include/cub/device/dispatch/dispatch_select_if.cuh +838 -0
  123. cuda/cccl/headers/include/cub/device/dispatch/dispatch_streaming_reduce.cuh +341 -0
  124. cuda/cccl/headers/include/cub/device/dispatch/dispatch_streaming_reduce_by_key.cuh +439 -0
  125. cuda/cccl/headers/include/cub/device/dispatch/dispatch_three_way_partition.cuh +552 -0
  126. cuda/cccl/headers/include/cub/device/dispatch/dispatch_transform.cuh +397 -0
  127. cuda/cccl/headers/include/cub/device/dispatch/dispatch_unique_by_key.cuh +543 -0
  128. cuda/cccl/headers/include/cub/device/dispatch/kernels/for_each.cuh +218 -0
  129. cuda/cccl/headers/include/cub/device/dispatch/kernels/histogram.cuh +505 -0
  130. cuda/cccl/headers/include/cub/device/dispatch/kernels/merge_sort.cuh +338 -0
  131. cuda/cccl/headers/include/cub/device/dispatch/kernels/radix_sort.cuh +799 -0
  132. cuda/cccl/headers/include/cub/device/dispatch/kernels/reduce.cuh +523 -0
  133. cuda/cccl/headers/include/cub/device/dispatch/kernels/scan.cuh +194 -0
  134. cuda/cccl/headers/include/cub/device/dispatch/kernels/segmented_reduce.cuh +330 -0
  135. cuda/cccl/headers/include/cub/device/dispatch/kernels/transform.cuh +437 -0
  136. cuda/cccl/headers/include/cub/device/dispatch/kernels/unique_by_key.cuh +176 -0
  137. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_adjacent_difference.cuh +70 -0
  138. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_batch_memcpy.cuh +121 -0
  139. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_for.cuh +63 -0
  140. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_histogram.cuh +278 -0
  141. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_merge.cuh +91 -0
  142. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_merge_sort.cuh +118 -0
  143. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_radix_sort.cuh +1068 -0
  144. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_reduce.cuh +397 -0
  145. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_reduce_by_key.cuh +945 -0
  146. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_run_length_encode.cuh +675 -0
  147. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_scan.cuh +555 -0
  148. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_scan_by_key.cuh +1013 -0
  149. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_segmented_sort.cuh +249 -0
  150. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_select_if.cuh +1587 -0
  151. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_three_way_partition.cuh +407 -0
  152. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_transform.cuh +283 -0
  153. cuda/cccl/headers/include/cub/device/dispatch/tuning/tuning_unique_by_key.cuh +874 -0
  154. cuda/cccl/headers/include/cub/grid/grid_even_share.cuh +215 -0
  155. cuda/cccl/headers/include/cub/grid/grid_mapping.cuh +106 -0
  156. cuda/cccl/headers/include/cub/grid/grid_queue.cuh +202 -0
  157. cuda/cccl/headers/include/cub/iterator/arg_index_input_iterator.cuh +256 -0
  158. cuda/cccl/headers/include/cub/iterator/cache_modified_input_iterator.cuh +238 -0
  159. cuda/cccl/headers/include/cub/iterator/cache_modified_output_iterator.cuh +252 -0
  160. cuda/cccl/headers/include/cub/iterator/tex_obj_input_iterator.cuh +322 -0
  161. cuda/cccl/headers/include/cub/thread/thread_load.cuh +347 -0
  162. cuda/cccl/headers/include/cub/thread/thread_operators.cuh +629 -0
  163. cuda/cccl/headers/include/cub/thread/thread_reduce.cuh +504 -0
  164. cuda/cccl/headers/include/cub/thread/thread_scan.cuh +340 -0
  165. cuda/cccl/headers/include/cub/thread/thread_search.cuh +198 -0
  166. cuda/cccl/headers/include/cub/thread/thread_simd.cuh +406 -0
  167. cuda/cccl/headers/include/cub/thread/thread_sort.cuh +101 -0
  168. cuda/cccl/headers/include/cub/thread/thread_store.cuh +364 -0
  169. cuda/cccl/headers/include/cub/util_allocator.cuh +921 -0
  170. cuda/cccl/headers/include/cub/util_arch.cuh +163 -0
  171. cuda/cccl/headers/include/cub/util_cpp_dialect.cuh +95 -0
  172. cuda/cccl/headers/include/cub/util_debug.cuh +207 -0
  173. cuda/cccl/headers/include/cub/util_device.cuh +779 -0
  174. cuda/cccl/headers/include/cub/util_macro.cuh +91 -0
  175. cuda/cccl/headers/include/cub/util_math.cuh +115 -0
  176. cuda/cccl/headers/include/cub/util_namespace.cuh +176 -0
  177. cuda/cccl/headers/include/cub/util_policy_wrapper_t.cuh +55 -0
  178. cuda/cccl/headers/include/cub/util_ptx.cuh +513 -0
  179. cuda/cccl/headers/include/cub/util_temporary_storage.cuh +122 -0
  180. cuda/cccl/headers/include/cub/util_type.cuh +1111 -0
  181. cuda/cccl/headers/include/cub/util_vsmem.cuh +251 -0
  182. cuda/cccl/headers/include/cub/version.cuh +89 -0
  183. cuda/cccl/headers/include/cub/warp/specializations/warp_exchange_shfl.cuh +329 -0
  184. cuda/cccl/headers/include/cub/warp/specializations/warp_exchange_smem.cuh +177 -0
  185. cuda/cccl/headers/include/cub/warp/specializations/warp_reduce_shfl.cuh +729 -0
  186. cuda/cccl/headers/include/cub/warp/specializations/warp_reduce_smem.cuh +405 -0
  187. cuda/cccl/headers/include/cub/warp/specializations/warp_scan_shfl.cuh +688 -0
  188. cuda/cccl/headers/include/cub/warp/specializations/warp_scan_smem.cuh +437 -0
  189. cuda/cccl/headers/include/cub/warp/warp_exchange.cuh +405 -0
  190. cuda/cccl/headers/include/cub/warp/warp_load.cuh +614 -0
  191. cuda/cccl/headers/include/cub/warp/warp_merge_sort.cuh +169 -0
  192. cuda/cccl/headers/include/cub/warp/warp_reduce.cuh +822 -0
  193. cuda/cccl/headers/include/cub/warp/warp_scan.cuh +1156 -0
  194. cuda/cccl/headers/include/cub/warp/warp_store.cuh +520 -0
  195. cuda/cccl/headers/include/cuda/__annotated_ptr/access_property.h +169 -0
  196. cuda/cccl/headers/include/cuda/__annotated_ptr/access_property_encoding.h +172 -0
  197. cuda/cccl/headers/include/cuda/__annotated_ptr/annotated_ptr.h +210 -0
  198. cuda/cccl/headers/include/cuda/__annotated_ptr/annotated_ptr_base.h +100 -0
  199. cuda/cccl/headers/include/cuda/__annotated_ptr/apply_access_property.h +84 -0
  200. cuda/cccl/headers/include/cuda/__annotated_ptr/associate_access_property.h +127 -0
  201. cuda/cccl/headers/include/cuda/__annotated_ptr/createpolicy.h +209 -0
  202. cuda/cccl/headers/include/cuda/__atomic/atomic.h +145 -0
  203. cuda/cccl/headers/include/cuda/__barrier/aligned_size.h +61 -0
  204. cuda/cccl/headers/include/cuda/__barrier/async_contract_fulfillment.h +39 -0
  205. cuda/cccl/headers/include/cuda/__barrier/barrier.h +66 -0
  206. cuda/cccl/headers/include/cuda/__barrier/barrier_arrive_tx.h +100 -0
  207. cuda/cccl/headers/include/cuda/__barrier/barrier_block_scope.h +454 -0
  208. cuda/cccl/headers/include/cuda/__barrier/barrier_expect_tx.h +72 -0
  209. cuda/cccl/headers/include/cuda/__barrier/barrier_native_handle.h +45 -0
  210. cuda/cccl/headers/include/cuda/__barrier/barrier_thread_scope.h +61 -0
  211. cuda/cccl/headers/include/cuda/__bit/bit_reverse.h +171 -0
  212. cuda/cccl/headers/include/cuda/__bit/bitfield.h +122 -0
  213. cuda/cccl/headers/include/cuda/__bit/bitmask.h +88 -0
  214. cuda/cccl/headers/include/cuda/__cccl_config +36 -0
  215. cuda/cccl/headers/include/cuda/__cmath/ceil_div.h +126 -0
  216. cuda/cccl/headers/include/cuda/__cmath/ilog.h +195 -0
  217. cuda/cccl/headers/include/cuda/__cmath/ipow.h +107 -0
  218. cuda/cccl/headers/include/cuda/__cmath/isqrt.h +80 -0
  219. cuda/cccl/headers/include/cuda/__cmath/neg.h +47 -0
  220. cuda/cccl/headers/include/cuda/__cmath/pow2.h +74 -0
  221. cuda/cccl/headers/include/cuda/__cmath/round_down.h +104 -0
  222. cuda/cccl/headers/include/cuda/__cmath/round_up.h +106 -0
  223. cuda/cccl/headers/include/cuda/__cmath/uabs.h +57 -0
  224. cuda/cccl/headers/include/cuda/__execution/determinism.h +90 -0
  225. cuda/cccl/headers/include/cuda/__execution/require.h +67 -0
  226. cuda/cccl/headers/include/cuda/__execution/tune.h +62 -0
  227. cuda/cccl/headers/include/cuda/__functional/address_stability.h +131 -0
  228. cuda/cccl/headers/include/cuda/__functional/for_each_canceled.h +279 -0
  229. cuda/cccl/headers/include/cuda/__functional/get_device_address.h +58 -0
  230. cuda/cccl/headers/include/cuda/__functional/maximum.h +58 -0
  231. cuda/cccl/headers/include/cuda/__functional/minimum.h +58 -0
  232. cuda/cccl/headers/include/cuda/__functional/proclaim_return_type.h +108 -0
  233. cuda/cccl/headers/include/cuda/__fwd/barrier.h +38 -0
  234. cuda/cccl/headers/include/cuda/__fwd/barrier_native_handle.h +42 -0
  235. cuda/cccl/headers/include/cuda/__fwd/get_stream.h +38 -0
  236. cuda/cccl/headers/include/cuda/__fwd/pipeline.h +37 -0
  237. cuda/cccl/headers/include/cuda/__iterator/constant_iterator.h +261 -0
  238. cuda/cccl/headers/include/cuda/__iterator/counting_iterator.h +407 -0
  239. cuda/cccl/headers/include/cuda/__iterator/discard_iterator.h +314 -0
  240. cuda/cccl/headers/include/cuda/__iterator/strided_iterator.h +323 -0
  241. cuda/cccl/headers/include/cuda/__iterator/transform_iterator.h +481 -0
  242. cuda/cccl/headers/include/cuda/__latch/latch.h +44 -0
  243. cuda/cccl/headers/include/cuda/__mdspan/host_device_accessor.h +457 -0
  244. cuda/cccl/headers/include/cuda/__mdspan/host_device_mdspan.h +63 -0
  245. cuda/cccl/headers/include/cuda/__mdspan/restrict_accessor.h +123 -0
  246. cuda/cccl/headers/include/cuda/__mdspan/restrict_mdspan.h +51 -0
  247. cuda/cccl/headers/include/cuda/__memcpy_async/check_preconditions.h +79 -0
  248. cuda/cccl/headers/include/cuda/__memcpy_async/completion_mechanism.h +47 -0
  249. cuda/cccl/headers/include/cuda/__memcpy_async/cp_async_bulk_shared_global.h +60 -0
  250. cuda/cccl/headers/include/cuda/__memcpy_async/cp_async_fallback.h +72 -0
  251. cuda/cccl/headers/include/cuda/__memcpy_async/cp_async_shared_global.h +98 -0
  252. cuda/cccl/headers/include/cuda/__memcpy_async/dispatch_memcpy_async.h +162 -0
  253. cuda/cccl/headers/include/cuda/__memcpy_async/is_local_smem_barrier.h +49 -0
  254. cuda/cccl/headers/include/cuda/__memcpy_async/memcpy_async.h +179 -0
  255. cuda/cccl/headers/include/cuda/__memcpy_async/memcpy_async_barrier.h +99 -0
  256. cuda/cccl/headers/include/cuda/__memcpy_async/memcpy_async_tx.h +99 -0
  257. cuda/cccl/headers/include/cuda/__memcpy_async/memcpy_completion.h +170 -0
  258. cuda/cccl/headers/include/cuda/__memcpy_async/try_get_barrier_handle.h +59 -0
  259. cuda/cccl/headers/include/cuda/__memory/address_space.h +86 -0
  260. cuda/cccl/headers/include/cuda/__memory_resource/get_memory_resource.h +94 -0
  261. cuda/cccl/headers/include/cuda/__memory_resource/get_property.h +158 -0
  262. cuda/cccl/headers/include/cuda/__memory_resource/properties.h +73 -0
  263. cuda/cccl/headers/include/cuda/__memory_resource/resource.h +129 -0
  264. cuda/cccl/headers/include/cuda/__memory_resource/resource_ref.h +653 -0
  265. cuda/cccl/headers/include/cuda/__numeric/narrow.h +108 -0
  266. cuda/cccl/headers/include/cuda/__numeric/overflow_cast.h +57 -0
  267. cuda/cccl/headers/include/cuda/__numeric/overflow_result.h +43 -0
  268. cuda/cccl/headers/include/cuda/__nvtx/nvtx.h +101 -0
  269. cuda/cccl/headers/include/cuda/__nvtx/nvtx3.h +2982 -0
  270. cuda/cccl/headers/include/cuda/__ptx/instructions/barrier_cluster.h +43 -0
  271. cuda/cccl/headers/include/cuda/__ptx/instructions/bfind.h +41 -0
  272. cuda/cccl/headers/include/cuda/__ptx/instructions/bmsk.h +41 -0
  273. cuda/cccl/headers/include/cuda/__ptx/instructions/clusterlaunchcontrol.h +41 -0
  274. cuda/cccl/headers/include/cuda/__ptx/instructions/cp_async_bulk.h +44 -0
  275. cuda/cccl/headers/include/cuda/__ptx/instructions/cp_async_bulk_commit_group.h +43 -0
  276. cuda/cccl/headers/include/cuda/__ptx/instructions/cp_async_bulk_tensor.h +45 -0
  277. cuda/cccl/headers/include/cuda/__ptx/instructions/cp_async_bulk_wait_group.h +43 -0
  278. cuda/cccl/headers/include/cuda/__ptx/instructions/cp_async_mbarrier_arrive.h +42 -0
  279. cuda/cccl/headers/include/cuda/__ptx/instructions/cp_reduce_async_bulk.h +60 -0
  280. cuda/cccl/headers/include/cuda/__ptx/instructions/cp_reduce_async_bulk_tensor.h +43 -0
  281. cuda/cccl/headers/include/cuda/__ptx/instructions/elect_sync.h +41 -0
  282. cuda/cccl/headers/include/cuda/__ptx/instructions/exit.h +41 -0
  283. cuda/cccl/headers/include/cuda/__ptx/instructions/fence.h +49 -0
  284. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/barrier_cluster.h +115 -0
  285. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/bfind.h +190 -0
  286. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/bmsk.h +54 -0
  287. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/clusterlaunchcontrol.h +240 -0
  288. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_async_bulk.h +193 -0
  289. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_async_bulk_commit_group.h +25 -0
  290. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_async_bulk_multicast.h +52 -0
  291. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_async_bulk_tensor.h +957 -0
  292. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_async_bulk_tensor_gather_scatter.h +288 -0
  293. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_async_bulk_tensor_multicast.h +596 -0
  294. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_async_bulk_wait_group.h +46 -0
  295. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_async_mbarrier_arrive.h +26 -0
  296. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_async_mbarrier_arrive_noinc.h +26 -0
  297. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_reduce_async_bulk.h +1445 -0
  298. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_reduce_async_bulk_bf16.h +132 -0
  299. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_reduce_async_bulk_f16.h +117 -0
  300. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/cp_reduce_async_bulk_tensor.h +601 -0
  301. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/elect_sync.h +36 -0
  302. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/exit.h +25 -0
  303. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/fence.h +208 -0
  304. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/fence_mbarrier_init.h +31 -0
  305. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/fence_proxy_alias.h +25 -0
  306. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/fence_proxy_async.h +58 -0
  307. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/fence_proxy_async_generic_sync_restrict.h +62 -0
  308. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/fence_proxy_tensormap_generic.h +101 -0
  309. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/fence_sync_restrict.h +62 -0
  310. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/get_sreg.h +949 -0
  311. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/getctarank.h +32 -0
  312. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/ld.h +15074 -0
  313. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/mbarrier_arrive.h +385 -0
  314. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/mbarrier_arrive_expect_tx.h +176 -0
  315. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/mbarrier_arrive_no_complete.h +34 -0
  316. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/mbarrier_expect_tx.h +94 -0
  317. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/mbarrier_init.h +27 -0
  318. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/mbarrier_test_wait.h +137 -0
  319. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/mbarrier_test_wait_parity.h +138 -0
  320. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/mbarrier_try_wait.h +280 -0
  321. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/mbarrier_try_wait_parity.h +282 -0
  322. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/multimem_ld_reduce.h +2148 -0
  323. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/multimem_red.h +1272 -0
  324. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/multimem_st.h +228 -0
  325. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/prmt.h +230 -0
  326. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/red_async.h +430 -0
  327. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/shl.h +96 -0
  328. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/shr.h +168 -0
  329. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/st.h +1830 -0
  330. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/st_async.h +123 -0
  331. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/st_bulk.h +31 -0
  332. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tcgen05_alloc.h +105 -0
  333. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tcgen05_commit.h +81 -0
  334. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tcgen05_cp.h +612 -0
  335. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tcgen05_fence.h +44 -0
  336. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tcgen05_ld.h +4446 -0
  337. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tcgen05_mma.h +4061 -0
  338. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tcgen05_mma_ws.h +6438 -0
  339. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tcgen05_shift.h +36 -0
  340. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tcgen05_st.h +4582 -0
  341. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tcgen05_wait.h +44 -0
  342. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tensormap_cp_fenceproxy.h +67 -0
  343. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/tensormap_replace.h +750 -0
  344. cuda/cccl/headers/include/cuda/__ptx/instructions/generated/trap.h +25 -0
  345. cuda/cccl/headers/include/cuda/__ptx/instructions/get_sreg.h +43 -0
  346. cuda/cccl/headers/include/cuda/__ptx/instructions/getctarank.h +43 -0
  347. cuda/cccl/headers/include/cuda/__ptx/instructions/ld.h +41 -0
  348. cuda/cccl/headers/include/cuda/__ptx/instructions/mbarrier_arrive.h +45 -0
  349. cuda/cccl/headers/include/cuda/__ptx/instructions/mbarrier_expect_tx.h +41 -0
  350. cuda/cccl/headers/include/cuda/__ptx/instructions/mbarrier_init.h +43 -0
  351. cuda/cccl/headers/include/cuda/__ptx/instructions/mbarrier_wait.h +46 -0
  352. cuda/cccl/headers/include/cuda/__ptx/instructions/multimem_ld_reduce.h +41 -0
  353. cuda/cccl/headers/include/cuda/__ptx/instructions/multimem_red.h +41 -0
  354. cuda/cccl/headers/include/cuda/__ptx/instructions/multimem_st.h +41 -0
  355. cuda/cccl/headers/include/cuda/__ptx/instructions/prmt.h +41 -0
  356. cuda/cccl/headers/include/cuda/__ptx/instructions/red_async.h +43 -0
  357. cuda/cccl/headers/include/cuda/__ptx/instructions/shfl_sync.h +275 -0
  358. cuda/cccl/headers/include/cuda/__ptx/instructions/shl.h +41 -0
  359. cuda/cccl/headers/include/cuda/__ptx/instructions/shr.h +41 -0
  360. cuda/cccl/headers/include/cuda/__ptx/instructions/st.h +41 -0
  361. cuda/cccl/headers/include/cuda/__ptx/instructions/st_async.h +43 -0
  362. cuda/cccl/headers/include/cuda/__ptx/instructions/st_bulk.h +41 -0
  363. cuda/cccl/headers/include/cuda/__ptx/instructions/tcgen05_alloc.h +41 -0
  364. cuda/cccl/headers/include/cuda/__ptx/instructions/tcgen05_commit.h +41 -0
  365. cuda/cccl/headers/include/cuda/__ptx/instructions/tcgen05_cp.h +41 -0
  366. cuda/cccl/headers/include/cuda/__ptx/instructions/tcgen05_fence.h +41 -0
  367. cuda/cccl/headers/include/cuda/__ptx/instructions/tcgen05_ld.h +41 -0
  368. cuda/cccl/headers/include/cuda/__ptx/instructions/tcgen05_mma.h +41 -0
  369. cuda/cccl/headers/include/cuda/__ptx/instructions/tcgen05_mma_ws.h +41 -0
  370. cuda/cccl/headers/include/cuda/__ptx/instructions/tcgen05_shift.h +41 -0
  371. cuda/cccl/headers/include/cuda/__ptx/instructions/tcgen05_st.h +41 -0
  372. cuda/cccl/headers/include/cuda/__ptx/instructions/tcgen05_wait.h +41 -0
  373. cuda/cccl/headers/include/cuda/__ptx/instructions/tensormap_cp_fenceproxy.h +43 -0
  374. cuda/cccl/headers/include/cuda/__ptx/instructions/tensormap_replace.h +43 -0
  375. cuda/cccl/headers/include/cuda/__ptx/instructions/trap.h +41 -0
  376. cuda/cccl/headers/include/cuda/__ptx/ptx_dot_variants.h +230 -0
  377. cuda/cccl/headers/include/cuda/__ptx/ptx_helper_functions.h +151 -0
  378. cuda/cccl/headers/include/cuda/__semaphore/counting_semaphore.h +53 -0
  379. cuda/cccl/headers/include/cuda/__stream/get_stream.h +97 -0
  380. cuda/cccl/headers/include/cuda/__stream/stream_ref.h +165 -0
  381. cuda/cccl/headers/include/cuda/__type_traits/is_floating_point.h +47 -0
  382. cuda/cccl/headers/include/cuda/__warp/lane_mask.h +326 -0
  383. cuda/cccl/headers/include/cuda/__warp/warp_match_all.h +66 -0
  384. cuda/cccl/headers/include/cuda/__warp/warp_shuffle.h +249 -0
  385. cuda/cccl/headers/include/cuda/access_property +26 -0
  386. cuda/cccl/headers/include/cuda/annotated_ptr +29 -0
  387. cuda/cccl/headers/include/cuda/atomic +27 -0
  388. cuda/cccl/headers/include/cuda/barrier +262 -0
  389. cuda/cccl/headers/include/cuda/bit +29 -0
  390. cuda/cccl/headers/include/cuda/cmath +35 -0
  391. cuda/cccl/headers/include/cuda/discard_memory +61 -0
  392. cuda/cccl/headers/include/cuda/functional +31 -0
  393. cuda/cccl/headers/include/cuda/iterator +31 -0
  394. cuda/cccl/headers/include/cuda/latch +27 -0
  395. cuda/cccl/headers/include/cuda/mdspan +28 -0
  396. cuda/cccl/headers/include/cuda/memory +28 -0
  397. cuda/cccl/headers/include/cuda/memory_resource +41 -0
  398. cuda/cccl/headers/include/cuda/numeric +28 -0
  399. cuda/cccl/headers/include/cuda/pipeline +579 -0
  400. cuda/cccl/headers/include/cuda/ptx +118 -0
  401. cuda/cccl/headers/include/cuda/semaphore +31 -0
  402. cuda/cccl/headers/include/cuda/std/__algorithm/adjacent_find.h +60 -0
  403. cuda/cccl/headers/include/cuda/std/__algorithm/all_of.h +46 -0
  404. cuda/cccl/headers/include/cuda/std/__algorithm/any_of.h +46 -0
  405. cuda/cccl/headers/include/cuda/std/__algorithm/binary_search.h +52 -0
  406. cuda/cccl/headers/include/cuda/std/__algorithm/clamp.h +48 -0
  407. cuda/cccl/headers/include/cuda/std/__algorithm/comp.h +64 -0
  408. cuda/cccl/headers/include/cuda/std/__algorithm/comp_ref_type.h +85 -0
  409. cuda/cccl/headers/include/cuda/std/__algorithm/copy.h +143 -0
  410. cuda/cccl/headers/include/cuda/std/__algorithm/copy_backward.h +79 -0
  411. cuda/cccl/headers/include/cuda/std/__algorithm/copy_if.h +47 -0
  412. cuda/cccl/headers/include/cuda/std/__algorithm/copy_n.h +74 -0
  413. cuda/cccl/headers/include/cuda/std/__algorithm/count.h +49 -0
  414. cuda/cccl/headers/include/cuda/std/__algorithm/count_if.h +49 -0
  415. cuda/cccl/headers/include/cuda/std/__algorithm/equal.h +129 -0
  416. cuda/cccl/headers/include/cuda/std/__algorithm/equal_range.h +101 -0
  417. cuda/cccl/headers/include/cuda/std/__algorithm/fill.h +58 -0
  418. cuda/cccl/headers/include/cuda/std/__algorithm/fill_n.h +51 -0
  419. cuda/cccl/headers/include/cuda/std/__algorithm/find.h +64 -0
  420. cuda/cccl/headers/include/cuda/std/__algorithm/find_end.h +225 -0
  421. cuda/cccl/headers/include/cuda/std/__algorithm/find_first_of.h +73 -0
  422. cuda/cccl/headers/include/cuda/std/__algorithm/find_if.h +46 -0
  423. cuda/cccl/headers/include/cuda/std/__algorithm/find_if_not.h +46 -0
  424. cuda/cccl/headers/include/cuda/std/__algorithm/for_each.h +42 -0
  425. cuda/cccl/headers/include/cuda/std/__algorithm/for_each_n.h +48 -0
  426. cuda/cccl/headers/include/cuda/std/__algorithm/generate.h +41 -0
  427. cuda/cccl/headers/include/cuda/std/__algorithm/generate_n.h +46 -0
  428. cuda/cccl/headers/include/cuda/std/__algorithm/half_positive.h +49 -0
  429. cuda/cccl/headers/include/cuda/std/__algorithm/includes.h +92 -0
  430. cuda/cccl/headers/include/cuda/std/__algorithm/is_heap.h +51 -0
  431. cuda/cccl/headers/include/cuda/std/__algorithm/is_heap_until.h +83 -0
  432. cuda/cccl/headers/include/cuda/std/__algorithm/is_partitioned.h +58 -0
  433. cuda/cccl/headers/include/cuda/std/__algorithm/is_permutation.h +252 -0
  434. cuda/cccl/headers/include/cuda/std/__algorithm/is_sorted.h +50 -0
  435. cuda/cccl/headers/include/cuda/std/__algorithm/is_sorted_until.h +69 -0
  436. cuda/cccl/headers/include/cuda/std/__algorithm/iter_swap.h +82 -0
  437. cuda/cccl/headers/include/cuda/std/__algorithm/iterator_operations.h +188 -0
  438. cuda/cccl/headers/include/cuda/std/__algorithm/lexicographical_compare.h +68 -0
  439. cuda/cccl/headers/include/cuda/std/__algorithm/lower_bound.h +83 -0
  440. cuda/cccl/headers/include/cuda/std/__algorithm/make_heap.h +72 -0
  441. cuda/cccl/headers/include/cuda/std/__algorithm/make_projected.h +96 -0
  442. cuda/cccl/headers/include/cuda/std/__algorithm/max.h +62 -0
  443. cuda/cccl/headers/include/cuda/std/__algorithm/max_element.h +70 -0
  444. cuda/cccl/headers/include/cuda/std/__algorithm/merge.h +89 -0
  445. cuda/cccl/headers/include/cuda/std/__algorithm/min.h +62 -0
  446. cuda/cccl/headers/include/cuda/std/__algorithm/min_element.h +88 -0
  447. cuda/cccl/headers/include/cuda/std/__algorithm/minmax.h +71 -0
  448. cuda/cccl/headers/include/cuda/std/__algorithm/minmax_element.h +141 -0
  449. cuda/cccl/headers/include/cuda/std/__algorithm/mismatch.h +83 -0
  450. cuda/cccl/headers/include/cuda/std/__algorithm/move.h +88 -0
  451. cuda/cccl/headers/include/cuda/std/__algorithm/move_backward.h +84 -0
  452. cuda/cccl/headers/include/cuda/std/__algorithm/next_permutation.h +89 -0
  453. cuda/cccl/headers/include/cuda/std/__algorithm/none_of.h +46 -0
  454. cuda/cccl/headers/include/cuda/std/__algorithm/partial_sort.h +102 -0
  455. cuda/cccl/headers/include/cuda/std/__algorithm/partial_sort_copy.h +122 -0
  456. cuda/cccl/headers/include/cuda/std/__algorithm/partition.h +121 -0
  457. cuda/cccl/headers/include/cuda/std/__algorithm/partition_copy.h +59 -0
  458. cuda/cccl/headers/include/cuda/std/__algorithm/partition_point.h +61 -0
  459. cuda/cccl/headers/include/cuda/std/__algorithm/pop_heap.h +95 -0
  460. cuda/cccl/headers/include/cuda/std/__algorithm/prev_permutation.h +89 -0
  461. cuda/cccl/headers/include/cuda/std/__algorithm/push_heap.h +103 -0
  462. cuda/cccl/headers/include/cuda/std/__algorithm/ranges_iterator_concept.h +65 -0
  463. cuda/cccl/headers/include/cuda/std/__algorithm/ranges_min.h +99 -0
  464. cuda/cccl/headers/include/cuda/std/__algorithm/ranges_min_element.h +69 -0
  465. cuda/cccl/headers/include/cuda/std/__algorithm/remove.h +55 -0
  466. cuda/cccl/headers/include/cuda/std/__algorithm/remove_copy.h +47 -0
  467. cuda/cccl/headers/include/cuda/std/__algorithm/remove_copy_if.h +47 -0
  468. cuda/cccl/headers/include/cuda/std/__algorithm/remove_if.h +56 -0
  469. cuda/cccl/headers/include/cuda/std/__algorithm/replace.h +45 -0
  470. cuda/cccl/headers/include/cuda/std/__algorithm/replace_copy.h +54 -0
  471. cuda/cccl/headers/include/cuda/std/__algorithm/replace_copy_if.h +50 -0
  472. cuda/cccl/headers/include/cuda/std/__algorithm/replace_if.h +45 -0
  473. cuda/cccl/headers/include/cuda/std/__algorithm/reverse.h +81 -0
  474. cuda/cccl/headers/include/cuda/std/__algorithm/reverse_copy.h +43 -0
  475. cuda/cccl/headers/include/cuda/std/__algorithm/rotate.h +264 -0
  476. cuda/cccl/headers/include/cuda/std/__algorithm/rotate_copy.h +40 -0
  477. cuda/cccl/headers/include/cuda/std/__algorithm/search.h +185 -0
  478. cuda/cccl/headers/include/cuda/std/__algorithm/search_n.h +163 -0
  479. cuda/cccl/headers/include/cuda/std/__algorithm/set_difference.h +95 -0
  480. cuda/cccl/headers/include/cuda/std/__algorithm/set_intersection.h +123 -0
  481. cuda/cccl/headers/include/cuda/std/__algorithm/set_symmetric_difference.h +135 -0
  482. cuda/cccl/headers/include/cuda/std/__algorithm/set_union.h +129 -0
  483. cuda/cccl/headers/include/cuda/std/__algorithm/shift_left.h +84 -0
  484. cuda/cccl/headers/include/cuda/std/__algorithm/shift_right.h +144 -0
  485. cuda/cccl/headers/include/cuda/std/__algorithm/sift_down.h +139 -0
  486. cuda/cccl/headers/include/cuda/std/__algorithm/sort_heap.h +72 -0
  487. cuda/cccl/headers/include/cuda/std/__algorithm/swap_ranges.h +78 -0
  488. cuda/cccl/headers/include/cuda/std/__algorithm/transform.h +59 -0
  489. cuda/cccl/headers/include/cuda/std/__algorithm/unique.h +77 -0
  490. cuda/cccl/headers/include/cuda/std/__algorithm/unique_copy.h +156 -0
  491. cuda/cccl/headers/include/cuda/std/__algorithm/unwrap_iter.h +96 -0
  492. cuda/cccl/headers/include/cuda/std/__algorithm/unwrap_range.h +127 -0
  493. cuda/cccl/headers/include/cuda/std/__algorithm/upper_bound.h +83 -0
  494. cuda/cccl/headers/include/cuda/std/__algorithm_ +26 -0
  495. cuda/cccl/headers/include/cuda/std/__atomic/api/common.h +192 -0
  496. cuda/cccl/headers/include/cuda/std/__atomic/api/owned.h +138 -0
  497. cuda/cccl/headers/include/cuda/std/__atomic/api/reference.h +118 -0
  498. cuda/cccl/headers/include/cuda/std/__atomic/functions/common.h +58 -0
  499. cuda/cccl/headers/include/cuda/std/__atomic/functions/cuda_local.h +218 -0
  500. cuda/cccl/headers/include/cuda/std/__atomic/functions/cuda_ptx_derived.h +401 -0
  501. cuda/cccl/headers/include/cuda/std/__atomic/functions/cuda_ptx_generated.h +3971 -0
  502. cuda/cccl/headers/include/cuda/std/__atomic/functions/cuda_ptx_generated_helper.h +177 -0
  503. cuda/cccl/headers/include/cuda/std/__atomic/functions/host.h +211 -0
  504. cuda/cccl/headers/include/cuda/std/__atomic/functions.h +33 -0
  505. cuda/cccl/headers/include/cuda/std/__atomic/order.h +159 -0
  506. cuda/cccl/headers/include/cuda/std/__atomic/platform/msvc_to_builtins.h +654 -0
  507. cuda/cccl/headers/include/cuda/std/__atomic/platform.h +93 -0
  508. cuda/cccl/headers/include/cuda/std/__atomic/scopes.h +105 -0
  509. cuda/cccl/headers/include/cuda/std/__atomic/types/base.h +250 -0
  510. cuda/cccl/headers/include/cuda/std/__atomic/types/common.h +105 -0
  511. cuda/cccl/headers/include/cuda/std/__atomic/types/locked.h +225 -0
  512. cuda/cccl/headers/include/cuda/std/__atomic/types/reference.h +73 -0
  513. cuda/cccl/headers/include/cuda/std/__atomic/types/small.h +228 -0
  514. cuda/cccl/headers/include/cuda/std/__atomic/types.h +52 -0
  515. cuda/cccl/headers/include/cuda/std/__atomic/wait/notify_wait.h +95 -0
  516. cuda/cccl/headers/include/cuda/std/__atomic/wait/polling.h +65 -0
  517. cuda/cccl/headers/include/cuda/std/__barrier/barrier.h +227 -0
  518. cuda/cccl/headers/include/cuda/std/__barrier/empty_completion.h +37 -0
  519. cuda/cccl/headers/include/cuda/std/__barrier/poll_tester.h +84 -0
  520. cuda/cccl/headers/include/cuda/std/__bit/bit_cast.h +77 -0
  521. cuda/cccl/headers/include/cuda/std/__bit/byteswap.h +183 -0
  522. cuda/cccl/headers/include/cuda/std/__bit/countl.h +167 -0
  523. cuda/cccl/headers/include/cuda/std/__bit/countr.h +185 -0
  524. cuda/cccl/headers/include/cuda/std/__bit/endian.h +39 -0
  525. cuda/cccl/headers/include/cuda/std/__bit/has_single_bit.h +43 -0
  526. cuda/cccl/headers/include/cuda/std/__bit/integral.h +124 -0
  527. cuda/cccl/headers/include/cuda/std/__bit/popcount.h +154 -0
  528. cuda/cccl/headers/include/cuda/std/__bit/reference.h +1274 -0
  529. cuda/cccl/headers/include/cuda/std/__bit/rotate.h +94 -0
  530. cuda/cccl/headers/include/cuda/std/__cccl/architecture.h +78 -0
  531. cuda/cccl/headers/include/cuda/std/__cccl/assert.h +146 -0
  532. cuda/cccl/headers/include/cuda/std/__cccl/attributes.h +207 -0
  533. cuda/cccl/headers/include/cuda/std/__cccl/builtin.h +1343 -0
  534. cuda/cccl/headers/include/cuda/std/__cccl/compiler.h +216 -0
  535. cuda/cccl/headers/include/cuda/std/__cccl/cuda_capabilities.h +43 -0
  536. cuda/cccl/headers/include/cuda/std/__cccl/cuda_toolkit.h +53 -0
  537. cuda/cccl/headers/include/cuda/std/__cccl/deprecated.h +69 -0
  538. cuda/cccl/headers/include/cuda/std/__cccl/diagnostic.h +129 -0
  539. cuda/cccl/headers/include/cuda/std/__cccl/dialect.h +124 -0
  540. cuda/cccl/headers/include/cuda/std/__cccl/epilogue.h +326 -0
  541. cuda/cccl/headers/include/cuda/std/__cccl/exceptions.h +35 -0
  542. cuda/cccl/headers/include/cuda/std/__cccl/execution_space.h +68 -0
  543. cuda/cccl/headers/include/cuda/std/__cccl/extended_data_types.h +129 -0
  544. cuda/cccl/headers/include/cuda/std/__cccl/is_non_narrowing_convertible.h +73 -0
  545. cuda/cccl/headers/include/cuda/std/__cccl/os.h +48 -0
  546. cuda/cccl/headers/include/cuda/std/__cccl/preprocessor.h +1234 -0
  547. cuda/cccl/headers/include/cuda/std/__cccl/prologue.h +267 -0
  548. cuda/cccl/headers/include/cuda/std/__cccl/ptx_isa.h +176 -0
  549. cuda/cccl/headers/include/cuda/std/__cccl/rtti.h +72 -0
  550. cuda/cccl/headers/include/cuda/std/__cccl/sequence_access.h +87 -0
  551. cuda/cccl/headers/include/cuda/std/__cccl/system_header.h +38 -0
  552. cuda/cccl/headers/include/cuda/std/__cccl/unreachable.h +31 -0
  553. cuda/cccl/headers/include/cuda/std/__cccl/version.h +26 -0
  554. cuda/cccl/headers/include/cuda/std/__cccl/visibility.h +112 -0
  555. cuda/cccl/headers/include/cuda/std/__charconv/chars_format.h +81 -0
  556. cuda/cccl/headers/include/cuda/std/__charconv/from_chars_result.h +56 -0
  557. cuda/cccl/headers/include/cuda/std/__charconv/to_chars.h +148 -0
  558. cuda/cccl/headers/include/cuda/std/__charconv/to_chars_result.h +56 -0
  559. cuda/cccl/headers/include/cuda/std/__charconv_ +30 -0
  560. cuda/cccl/headers/include/cuda/std/__cmath/abs.h +240 -0
  561. cuda/cccl/headers/include/cuda/std/__cmath/copysign.h +187 -0
  562. cuda/cccl/headers/include/cuda/std/__cmath/exponential_functions.h +620 -0
  563. cuda/cccl/headers/include/cuda/std/__cmath/fpclassify.h +207 -0
  564. cuda/cccl/headers/include/cuda/std/__cmath/gamma.h +181 -0
  565. cuda/cccl/headers/include/cuda/std/__cmath/hyperbolic_functions.h +250 -0
  566. cuda/cccl/headers/include/cuda/std/__cmath/hypot.h +213 -0
  567. cuda/cccl/headers/include/cuda/std/__cmath/inverse_hyperbolic_functions.h +250 -0
  568. cuda/cccl/headers/include/cuda/std/__cmath/inverse_trigonometric_functions.h +323 -0
  569. cuda/cccl/headers/include/cuda/std/__cmath/isfinite.h +163 -0
  570. cuda/cccl/headers/include/cuda/std/__cmath/isinf.h +201 -0
  571. cuda/cccl/headers/include/cuda/std/__cmath/isnan.h +176 -0
  572. cuda/cccl/headers/include/cuda/std/__cmath/isnormal.h +129 -0
  573. cuda/cccl/headers/include/cuda/std/__cmath/lerp.h +106 -0
  574. cuda/cccl/headers/include/cuda/std/__cmath/logarithms.h +503 -0
  575. cuda/cccl/headers/include/cuda/std/__cmath/min_max.h +236 -0
  576. cuda/cccl/headers/include/cuda/std/__cmath/nvbf16.h +58 -0
  577. cuda/cccl/headers/include/cuda/std/__cmath/nvfp16.h +58 -0
  578. cuda/cccl/headers/include/cuda/std/__cmath/roots.h +180 -0
  579. cuda/cccl/headers/include/cuda/std/__cmath/rounding_functions.h +877 -0
  580. cuda/cccl/headers/include/cuda/std/__cmath/signbit.h +155 -0
  581. cuda/cccl/headers/include/cuda/std/__cmath/traits.h +170 -0
  582. cuda/cccl/headers/include/cuda/std/__cmath/trigonometric_functions.h +292 -0
  583. cuda/cccl/headers/include/cuda/std/__complex/nvbf16.h +351 -0
  584. cuda/cccl/headers/include/cuda/std/__complex/nvfp16.h +350 -0
  585. cuda/cccl/headers/include/cuda/std/__complex/vector_support.h +135 -0
  586. cuda/cccl/headers/include/cuda/std/__concepts/arithmetic.h +56 -0
  587. cuda/cccl/headers/include/cuda/std/__concepts/assignable.h +64 -0
  588. cuda/cccl/headers/include/cuda/std/__concepts/boolean_testable.h +63 -0
  589. cuda/cccl/headers/include/cuda/std/__concepts/class_or_enum.h +46 -0
  590. cuda/cccl/headers/include/cuda/std/__concepts/common_reference_with.h +69 -0
  591. cuda/cccl/headers/include/cuda/std/__concepts/common_with.h +82 -0
  592. cuda/cccl/headers/include/cuda/std/__concepts/concept_macros.h +274 -0
  593. cuda/cccl/headers/include/cuda/std/__concepts/constructible.h +107 -0
  594. cuda/cccl/headers/include/cuda/std/__concepts/convertible_to.h +71 -0
  595. cuda/cccl/headers/include/cuda/std/__concepts/copyable.h +60 -0
  596. cuda/cccl/headers/include/cuda/std/__concepts/derived_from.h +57 -0
  597. cuda/cccl/headers/include/cuda/std/__concepts/destructible.h +76 -0
  598. cuda/cccl/headers/include/cuda/std/__concepts/different_from.h +38 -0
  599. cuda/cccl/headers/include/cuda/std/__concepts/equality_comparable.h +100 -0
  600. cuda/cccl/headers/include/cuda/std/__concepts/invocable.h +80 -0
  601. cuda/cccl/headers/include/cuda/std/__concepts/movable.h +58 -0
  602. cuda/cccl/headers/include/cuda/std/__concepts/predicate.h +54 -0
  603. cuda/cccl/headers/include/cuda/std/__concepts/regular.h +54 -0
  604. cuda/cccl/headers/include/cuda/std/__concepts/relation.h +77 -0
  605. cuda/cccl/headers/include/cuda/std/__concepts/same_as.h +42 -0
  606. cuda/cccl/headers/include/cuda/std/__concepts/semiregular.h +54 -0
  607. cuda/cccl/headers/include/cuda/std/__concepts/swappable.h +206 -0
  608. cuda/cccl/headers/include/cuda/std/__concepts/totally_ordered.h +101 -0
  609. cuda/cccl/headers/include/cuda/std/__cstddef/byte.h +113 -0
  610. cuda/cccl/headers/include/cuda/std/__cstddef/types.h +52 -0
  611. cuda/cccl/headers/include/cuda/std/__cstdlib/abs.h +57 -0
  612. cuda/cccl/headers/include/cuda/std/__cstdlib/aligned_alloc.h +66 -0
  613. cuda/cccl/headers/include/cuda/std/__cstdlib/div.h +96 -0
  614. cuda/cccl/headers/include/cuda/std/__cstdlib/malloc.h +69 -0
  615. cuda/cccl/headers/include/cuda/std/__cuda/api_wrapper.h +62 -0
  616. cuda/cccl/headers/include/cuda/std/__cuda/ensure_current_device.h +72 -0
  617. cuda/cccl/headers/include/cuda/std/__exception/cuda_error.h +143 -0
  618. cuda/cccl/headers/include/cuda/std/__exception/terminate.h +73 -0
  619. cuda/cccl/headers/include/cuda/std/__execution/env.h +436 -0
  620. cuda/cccl/headers/include/cuda/std/__expected/bad_expected_access.h +127 -0
  621. cuda/cccl/headers/include/cuda/std/__expected/expected.h +2002 -0
  622. cuda/cccl/headers/include/cuda/std/__expected/expected_base.h +1078 -0
  623. cuda/cccl/headers/include/cuda/std/__expected/unexpect.h +37 -0
  624. cuda/cccl/headers/include/cuda/std/__expected/unexpected.h +178 -0
  625. cuda/cccl/headers/include/cuda/std/__floating_point/arithmetic.h +56 -0
  626. cuda/cccl/headers/include/cuda/std/__floating_point/cast.h +809 -0
  627. cuda/cccl/headers/include/cuda/std/__floating_point/cccl_fp.h +125 -0
  628. cuda/cccl/headers/include/cuda/std/__floating_point/common_type.h +48 -0
  629. cuda/cccl/headers/include/cuda/std/__floating_point/constants.h +172 -0
  630. cuda/cccl/headers/include/cuda/std/__floating_point/conversion_rank_order.h +103 -0
  631. cuda/cccl/headers/include/cuda/std/__floating_point/format.h +162 -0
  632. cuda/cccl/headers/include/cuda/std/__floating_point/fp.h +39 -0
  633. cuda/cccl/headers/include/cuda/std/__floating_point/mask.h +64 -0
  634. cuda/cccl/headers/include/cuda/std/__floating_point/native_type.h +81 -0
  635. cuda/cccl/headers/include/cuda/std/__floating_point/nvfp_types.h +58 -0
  636. cuda/cccl/headers/include/cuda/std/__floating_point/overflow_handler.h +139 -0
  637. cuda/cccl/headers/include/cuda/std/__floating_point/properties.h +229 -0
  638. cuda/cccl/headers/include/cuda/std/__floating_point/storage.h +248 -0
  639. cuda/cccl/headers/include/cuda/std/__floating_point/traits.h +172 -0
  640. cuda/cccl/headers/include/cuda/std/__functional/binary_function.h +63 -0
  641. cuda/cccl/headers/include/cuda/std/__functional/binary_negate.h +65 -0
  642. cuda/cccl/headers/include/cuda/std/__functional/bind.h +352 -0
  643. cuda/cccl/headers/include/cuda/std/__functional/bind_back.h +88 -0
  644. cuda/cccl/headers/include/cuda/std/__functional/bind_front.h +73 -0
  645. cuda/cccl/headers/include/cuda/std/__functional/binder1st.h +75 -0
  646. cuda/cccl/headers/include/cuda/std/__functional/binder2nd.h +75 -0
  647. cuda/cccl/headers/include/cuda/std/__functional/compose.h +69 -0
  648. cuda/cccl/headers/include/cuda/std/__functional/default_searcher.h +75 -0
  649. cuda/cccl/headers/include/cuda/std/__functional/function.h +1277 -0
  650. cuda/cccl/headers/include/cuda/std/__functional/hash.h +650 -0
  651. cuda/cccl/headers/include/cuda/std/__functional/identity.h +61 -0
  652. cuda/cccl/headers/include/cuda/std/__functional/invoke.h +560 -0
  653. cuda/cccl/headers/include/cuda/std/__functional/is_transparent.h +43 -0
  654. cuda/cccl/headers/include/cuda/std/__functional/mem_fn.h +67 -0
  655. cuda/cccl/headers/include/cuda/std/__functional/mem_fun_ref.h +214 -0
  656. cuda/cccl/headers/include/cuda/std/__functional/not_fn.h +121 -0
  657. cuda/cccl/headers/include/cuda/std/__functional/operations.h +534 -0
  658. cuda/cccl/headers/include/cuda/std/__functional/perfect_forward.h +127 -0
  659. cuda/cccl/headers/include/cuda/std/__functional/pointer_to_binary_function.h +65 -0
  660. cuda/cccl/headers/include/cuda/std/__functional/pointer_to_unary_function.h +64 -0
  661. cuda/cccl/headers/include/cuda/std/__functional/ranges_operations.h +113 -0
  662. cuda/cccl/headers/include/cuda/std/__functional/reference_wrapper.h +113 -0
  663. cuda/cccl/headers/include/cuda/std/__functional/unary_function.h +62 -0
  664. cuda/cccl/headers/include/cuda/std/__functional/unary_negate.h +67 -0
  665. cuda/cccl/headers/include/cuda/std/__functional/unwrap_ref.h +56 -0
  666. cuda/cccl/headers/include/cuda/std/__functional/weak_result_type.h +278 -0
  667. cuda/cccl/headers/include/cuda/std/__fwd/allocator.h +35 -0
  668. cuda/cccl/headers/include/cuda/std/__fwd/array.h +36 -0
  669. cuda/cccl/headers/include/cuda/std/__fwd/char_traits.h +49 -0
  670. cuda/cccl/headers/include/cuda/std/__fwd/complex.h +34 -0
  671. cuda/cccl/headers/include/cuda/std/__fwd/fp.h +37 -0
  672. cuda/cccl/headers/include/cuda/std/__fwd/get.h +123 -0
  673. cuda/cccl/headers/include/cuda/std/__fwd/hash.h +34 -0
  674. cuda/cccl/headers/include/cuda/std/__fwd/iterator_traits.h +40 -0
  675. cuda/cccl/headers/include/cuda/std/__fwd/mdspan.h +73 -0
  676. cuda/cccl/headers/include/cuda/std/__fwd/memory_resource.h +37 -0
  677. cuda/cccl/headers/include/cuda/std/__fwd/pair.h +34 -0
  678. cuda/cccl/headers/include/cuda/std/__fwd/reference_wrapper.h +34 -0
  679. cuda/cccl/headers/include/cuda/std/__fwd/span.h +38 -0
  680. cuda/cccl/headers/include/cuda/std/__fwd/string.h +83 -0
  681. cuda/cccl/headers/include/cuda/std/__fwd/string_view.h +59 -0
  682. cuda/cccl/headers/include/cuda/std/__fwd/subrange.h +55 -0
  683. cuda/cccl/headers/include/cuda/std/__fwd/tuple.h +34 -0
  684. cuda/cccl/headers/include/cuda/std/__internal/cpp_dialect.h +44 -0
  685. cuda/cccl/headers/include/cuda/std/__internal/features.h +71 -0
  686. cuda/cccl/headers/include/cuda/std/__internal/namespaces.h +102 -0
  687. cuda/cccl/headers/include/cuda/std/__iterator/access.h +132 -0
  688. cuda/cccl/headers/include/cuda/std/__iterator/advance.h +230 -0
  689. cuda/cccl/headers/include/cuda/std/__iterator/back_insert_iterator.h +103 -0
  690. cuda/cccl/headers/include/cuda/std/__iterator/bounded_iter.h +264 -0
  691. cuda/cccl/headers/include/cuda/std/__iterator/concepts.h +608 -0
  692. cuda/cccl/headers/include/cuda/std/__iterator/counted_iterator.h +469 -0
  693. cuda/cccl/headers/include/cuda/std/__iterator/data.h +63 -0
  694. cuda/cccl/headers/include/cuda/std/__iterator/default_sentinel.h +36 -0
  695. cuda/cccl/headers/include/cuda/std/__iterator/distance.h +126 -0
  696. cuda/cccl/headers/include/cuda/std/__iterator/empty.h +54 -0
  697. cuda/cccl/headers/include/cuda/std/__iterator/erase_if_container.h +53 -0
  698. cuda/cccl/headers/include/cuda/std/__iterator/front_insert_iterator.h +98 -0
  699. cuda/cccl/headers/include/cuda/std/__iterator/incrementable_traits.h +152 -0
  700. cuda/cccl/headers/include/cuda/std/__iterator/indirectly_comparable.h +55 -0
  701. cuda/cccl/headers/include/cuda/std/__iterator/insert_iterator.h +105 -0
  702. cuda/cccl/headers/include/cuda/std/__iterator/istream_iterator.h +141 -0
  703. cuda/cccl/headers/include/cuda/std/__iterator/istreambuf_iterator.h +161 -0
  704. cuda/cccl/headers/include/cuda/std/__iterator/iter_move.h +161 -0
  705. cuda/cccl/headers/include/cuda/std/__iterator/iter_swap.h +163 -0
  706. cuda/cccl/headers/include/cuda/std/__iterator/iterator.h +44 -0
  707. cuda/cccl/headers/include/cuda/std/__iterator/iterator_traits.h +935 -0
  708. cuda/cccl/headers/include/cuda/std/__iterator/mergeable.h +72 -0
  709. cuda/cccl/headers/include/cuda/std/__iterator/move_iterator.h +401 -0
  710. cuda/cccl/headers/include/cuda/std/__iterator/move_sentinel.h +73 -0
  711. cuda/cccl/headers/include/cuda/std/__iterator/next.h +102 -0
  712. cuda/cccl/headers/include/cuda/std/__iterator/ostream_iterator.h +99 -0
  713. cuda/cccl/headers/include/cuda/std/__iterator/ostreambuf_iterator.h +101 -0
  714. cuda/cccl/headers/include/cuda/std/__iterator/permutable.h +54 -0
  715. cuda/cccl/headers/include/cuda/std/__iterator/prev.h +92 -0
  716. cuda/cccl/headers/include/cuda/std/__iterator/projected.h +61 -0
  717. cuda/cccl/headers/include/cuda/std/__iterator/readable_traits.h +185 -0
  718. cuda/cccl/headers/include/cuda/std/__iterator/reverse_access.h +146 -0
  719. cuda/cccl/headers/include/cuda/std/__iterator/reverse_iterator.h +615 -0
  720. cuda/cccl/headers/include/cuda/std/__iterator/size.h +69 -0
  721. cuda/cccl/headers/include/cuda/std/__iterator/sortable.h +55 -0
  722. cuda/cccl/headers/include/cuda/std/__iterator/unreachable_sentinel.h +88 -0
  723. cuda/cccl/headers/include/cuda/std/__iterator/wrap_iter.h +259 -0
  724. cuda/cccl/headers/include/cuda/std/__latch/latch.h +88 -0
  725. cuda/cccl/headers/include/cuda/std/__limits/numeric_limits.h +617 -0
  726. cuda/cccl/headers/include/cuda/std/__limits/numeric_limits_ext.h +781 -0
  727. cuda/cccl/headers/include/cuda/std/__linalg/conj_if_needed.h +78 -0
  728. cuda/cccl/headers/include/cuda/std/__linalg/conjugate_transposed.h +55 -0
  729. cuda/cccl/headers/include/cuda/std/__linalg/conjugated.h +140 -0
  730. cuda/cccl/headers/include/cuda/std/__linalg/scaled.h +134 -0
  731. cuda/cccl/headers/include/cuda/std/__linalg/transposed.h +328 -0
  732. cuda/cccl/headers/include/cuda/std/__mdspan/aligned_accessor.h +100 -0
  733. cuda/cccl/headers/include/cuda/std/__mdspan/concepts.h +139 -0
  734. cuda/cccl/headers/include/cuda/std/__mdspan/default_accessor.h +74 -0
  735. cuda/cccl/headers/include/cuda/std/__mdspan/empty_base.h +363 -0
  736. cuda/cccl/headers/include/cuda/std/__mdspan/extents.h +765 -0
  737. cuda/cccl/headers/include/cuda/std/__mdspan/layout_left.h +317 -0
  738. cuda/cccl/headers/include/cuda/std/__mdspan/layout_right.h +310 -0
  739. cuda/cccl/headers/include/cuda/std/__mdspan/layout_stride.h +615 -0
  740. cuda/cccl/headers/include/cuda/std/__mdspan/mdspan.h +512 -0
  741. cuda/cccl/headers/include/cuda/std/__mdspan/submdspan_extents.h +193 -0
  742. cuda/cccl/headers/include/cuda/std/__mdspan/submdspan_helper.h +190 -0
  743. cuda/cccl/headers/include/cuda/std/__mdspan/submdspan_mapping.h +347 -0
  744. cuda/cccl/headers/include/cuda/std/__memory/addressof.h +64 -0
  745. cuda/cccl/headers/include/cuda/std/__memory/align.h +87 -0
  746. cuda/cccl/headers/include/cuda/std/__memory/allocate_at_least.h +81 -0
  747. cuda/cccl/headers/include/cuda/std/__memory/allocation_guard.h +100 -0
  748. cuda/cccl/headers/include/cuda/std/__memory/allocator.h +320 -0
  749. cuda/cccl/headers/include/cuda/std/__memory/allocator_arg_t.h +84 -0
  750. cuda/cccl/headers/include/cuda/std/__memory/allocator_destructor.h +59 -0
  751. cuda/cccl/headers/include/cuda/std/__memory/allocator_traits.h +569 -0
  752. cuda/cccl/headers/include/cuda/std/__memory/assume_aligned.h +60 -0
  753. cuda/cccl/headers/include/cuda/std/__memory/builtin_new_allocator.h +87 -0
  754. cuda/cccl/headers/include/cuda/std/__memory/compressed_pair.h +231 -0
  755. cuda/cccl/headers/include/cuda/std/__memory/construct_at.h +248 -0
  756. cuda/cccl/headers/include/cuda/std/__memory/destruct_n.h +91 -0
  757. cuda/cccl/headers/include/cuda/std/__memory/is_sufficiently_aligned.h +43 -0
  758. cuda/cccl/headers/include/cuda/std/__memory/pointer_traits.h +260 -0
  759. cuda/cccl/headers/include/cuda/std/__memory/temporary_buffer.h +92 -0
  760. cuda/cccl/headers/include/cuda/std/__memory/uninitialized_algorithms.h +686 -0
  761. cuda/cccl/headers/include/cuda/std/__memory/unique_ptr.h +771 -0
  762. cuda/cccl/headers/include/cuda/std/__memory/uses_allocator.h +55 -0
  763. cuda/cccl/headers/include/cuda/std/__memory/voidify.h +41 -0
  764. cuda/cccl/headers/include/cuda/std/__memory_ +34 -0
  765. cuda/cccl/headers/include/cuda/std/__new/allocate.h +126 -0
  766. cuda/cccl/headers/include/cuda/std/__new/bad_alloc.h +57 -0
  767. cuda/cccl/headers/include/cuda/std/__new/launder.h +49 -0
  768. cuda/cccl/headers/include/cuda/std/__new_ +29 -0
  769. cuda/cccl/headers/include/cuda/std/__numeric/accumulate.h +57 -0
  770. cuda/cccl/headers/include/cuda/std/__numeric/adjacent_difference.h +72 -0
  771. cuda/cccl/headers/include/cuda/std/__numeric/exclusive_scan.h +66 -0
  772. cuda/cccl/headers/include/cuda/std/__numeric/gcd_lcm.h +80 -0
  773. cuda/cccl/headers/include/cuda/std/__numeric/inclusive_scan.h +73 -0
  774. cuda/cccl/headers/include/cuda/std/__numeric/inner_product.h +62 -0
  775. cuda/cccl/headers/include/cuda/std/__numeric/iota.h +42 -0
  776. cuda/cccl/headers/include/cuda/std/__numeric/midpoint.h +100 -0
  777. cuda/cccl/headers/include/cuda/std/__numeric/partial_sum.h +70 -0
  778. cuda/cccl/headers/include/cuda/std/__numeric/reduce.h +61 -0
  779. cuda/cccl/headers/include/cuda/std/__numeric/transform_exclusive_scan.h +51 -0
  780. cuda/cccl/headers/include/cuda/std/__numeric/transform_inclusive_scan.h +65 -0
  781. cuda/cccl/headers/include/cuda/std/__numeric/transform_reduce.h +72 -0
  782. cuda/cccl/headers/include/cuda/std/__ranges/access.h +304 -0
  783. cuda/cccl/headers/include/cuda/std/__ranges/all.h +97 -0
  784. cuda/cccl/headers/include/cuda/std/__ranges/concepts.h +313 -0
  785. cuda/cccl/headers/include/cuda/std/__ranges/counted.h +90 -0
  786. cuda/cccl/headers/include/cuda/std/__ranges/dangling.h +54 -0
  787. cuda/cccl/headers/include/cuda/std/__ranges/data.h +136 -0
  788. cuda/cccl/headers/include/cuda/std/__ranges/empty.h +111 -0
  789. cuda/cccl/headers/include/cuda/std/__ranges/empty_view.h +77 -0
  790. cuda/cccl/headers/include/cuda/std/__ranges/enable_borrowed_range.h +41 -0
  791. cuda/cccl/headers/include/cuda/std/__ranges/enable_view.h +77 -0
  792. cuda/cccl/headers/include/cuda/std/__ranges/from_range.h +36 -0
  793. cuda/cccl/headers/include/cuda/std/__ranges/iota_view.h +271 -0
  794. cuda/cccl/headers/include/cuda/std/__ranges/movable_box.h +410 -0
  795. cuda/cccl/headers/include/cuda/std/__ranges/owning_view.h +161 -0
  796. cuda/cccl/headers/include/cuda/std/__ranges/range_adaptor.h +114 -0
  797. cuda/cccl/headers/include/cuda/std/__ranges/rbegin.h +175 -0
  798. cuda/cccl/headers/include/cuda/std/__ranges/ref_view.h +121 -0
  799. cuda/cccl/headers/include/cuda/std/__ranges/rend.h +182 -0
  800. cuda/cccl/headers/include/cuda/std/__ranges/repeat_view.h +343 -0
  801. cuda/cccl/headers/include/cuda/std/__ranges/single_view.h +156 -0
  802. cuda/cccl/headers/include/cuda/std/__ranges/size.h +200 -0
  803. cuda/cccl/headers/include/cuda/std/__ranges/subrange.h +513 -0
  804. cuda/cccl/headers/include/cuda/std/__ranges/take_while_view.h +263 -0
  805. cuda/cccl/headers/include/cuda/std/__ranges/transform_view.h +531 -0
  806. cuda/cccl/headers/include/cuda/std/__ranges/unwrap_end.h +53 -0
  807. cuda/cccl/headers/include/cuda/std/__ranges/view_interface.h +181 -0
  808. cuda/cccl/headers/include/cuda/std/__ranges/views.h +38 -0
  809. cuda/cccl/headers/include/cuda/std/__semaphore/atomic_semaphore.h +233 -0
  810. cuda/cccl/headers/include/cuda/std/__semaphore/counting_semaphore.h +51 -0
  811. cuda/cccl/headers/include/cuda/std/__string/char_traits.h +191 -0
  812. cuda/cccl/headers/include/cuda/std/__string/constexpr_c_functions.h +591 -0
  813. cuda/cccl/headers/include/cuda/std/__string/helper_functions.h +299 -0
  814. cuda/cccl/headers/include/cuda/std/__string/string_view.h +244 -0
  815. cuda/cccl/headers/include/cuda/std/__string_ +29 -0
  816. cuda/cccl/headers/include/cuda/std/__system_error/errc.h +51 -0
  817. cuda/cccl/headers/include/cuda/std/__system_error_ +26 -0
  818. cuda/cccl/headers/include/cuda/std/__thread/threading_support.h +105 -0
  819. cuda/cccl/headers/include/cuda/std/__thread/threading_support_cuda.h +47 -0
  820. cuda/cccl/headers/include/cuda/std/__thread/threading_support_external.h +41 -0
  821. cuda/cccl/headers/include/cuda/std/__thread/threading_support_pthread.h +144 -0
  822. cuda/cccl/headers/include/cuda/std/__thread/threading_support_win32.h +87 -0
  823. cuda/cccl/headers/include/cuda/std/__tuple_dir/ignore.h +51 -0
  824. cuda/cccl/headers/include/cuda/std/__tuple_dir/make_tuple_types.h +98 -0
  825. cuda/cccl/headers/include/cuda/std/__tuple_dir/sfinae_helpers.h +236 -0
  826. cuda/cccl/headers/include/cuda/std/__tuple_dir/structured_bindings.h +216 -0
  827. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple_element.h +70 -0
  828. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple_indices.h +44 -0
  829. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple_like.h +90 -0
  830. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple_like_ext.h +73 -0
  831. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple_size.h +79 -0
  832. cuda/cccl/headers/include/cuda/std/__tuple_dir/tuple_types.h +35 -0
  833. cuda/cccl/headers/include/cuda/std/__tuple_dir/vector_types.h +242 -0
  834. cuda/cccl/headers/include/cuda/std/__type_traits/add_const.h +40 -0
  835. cuda/cccl/headers/include/cuda/std/__type_traits/add_cv.h +40 -0
  836. cuda/cccl/headers/include/cuda/std/__type_traits/add_lvalue_reference.h +62 -0
  837. cuda/cccl/headers/include/cuda/std/__type_traits/add_pointer.h +65 -0
  838. cuda/cccl/headers/include/cuda/std/__type_traits/add_rvalue_reference.h +62 -0
  839. cuda/cccl/headers/include/cuda/std/__type_traits/add_volatile.h +40 -0
  840. cuda/cccl/headers/include/cuda/std/__type_traits/aligned_storage.h +149 -0
  841. cuda/cccl/headers/include/cuda/std/__type_traits/aligned_union.h +62 -0
  842. cuda/cccl/headers/include/cuda/std/__type_traits/alignment_of.h +41 -0
  843. cuda/cccl/headers/include/cuda/std/__type_traits/always_false.h +35 -0
  844. cuda/cccl/headers/include/cuda/std/__type_traits/can_extract_key.h +69 -0
  845. cuda/cccl/headers/include/cuda/std/__type_traits/common_reference.h +262 -0
  846. cuda/cccl/headers/include/cuda/std/__type_traits/common_type.h +174 -0
  847. cuda/cccl/headers/include/cuda/std/__type_traits/conditional.h +65 -0
  848. cuda/cccl/headers/include/cuda/std/__type_traits/conjunction.h +67 -0
  849. cuda/cccl/headers/include/cuda/std/__type_traits/copy_cv.h +50 -0
  850. cuda/cccl/headers/include/cuda/std/__type_traits/copy_cvref.h +148 -0
  851. cuda/cccl/headers/include/cuda/std/__type_traits/decay.h +83 -0
  852. cuda/cccl/headers/include/cuda/std/__type_traits/dependent_type.h +35 -0
  853. cuda/cccl/headers/include/cuda/std/__type_traits/disjunction.h +77 -0
  854. cuda/cccl/headers/include/cuda/std/__type_traits/enable_if.h +43 -0
  855. cuda/cccl/headers/include/cuda/std/__type_traits/extent.h +68 -0
  856. cuda/cccl/headers/include/cuda/std/__type_traits/fold.h +47 -0
  857. cuda/cccl/headers/include/cuda/std/__type_traits/has_unique_object_representation.h +47 -0
  858. cuda/cccl/headers/include/cuda/std/__type_traits/has_virtual_destructor.h +51 -0
  859. cuda/cccl/headers/include/cuda/std/__type_traits/integral_constant.h +62 -0
  860. cuda/cccl/headers/include/cuda/std/__type_traits/is_abstract.h +40 -0
  861. cuda/cccl/headers/include/cuda/std/__type_traits/is_aggregate.h +44 -0
  862. cuda/cccl/headers/include/cuda/std/__type_traits/is_allocator.h +46 -0
  863. cuda/cccl/headers/include/cuda/std/__type_traits/is_arithmetic.h +42 -0
  864. cuda/cccl/headers/include/cuda/std/__type_traits/is_array.h +62 -0
  865. cuda/cccl/headers/include/cuda/std/__type_traits/is_assignable.h +78 -0
  866. cuda/cccl/headers/include/cuda/std/__type_traits/is_base_of.h +83 -0
  867. cuda/cccl/headers/include/cuda/std/__type_traits/is_bounded_array.h +44 -0
  868. cuda/cccl/headers/include/cuda/std/__type_traits/is_callable.h +60 -0
  869. cuda/cccl/headers/include/cuda/std/__type_traits/is_char_like_type.h +38 -0
  870. cuda/cccl/headers/include/cuda/std/__type_traits/is_class.h +68 -0
  871. cuda/cccl/headers/include/cuda/std/__type_traits/is_compound.h +54 -0
  872. cuda/cccl/headers/include/cuda/std/__type_traits/is_const.h +56 -0
  873. cuda/cccl/headers/include/cuda/std/__type_traits/is_constant_evaluated.h +51 -0
  874. cuda/cccl/headers/include/cuda/std/__type_traits/is_constructible.h +174 -0
  875. cuda/cccl/headers/include/cuda/std/__type_traits/is_convertible.h +214 -0
  876. cuda/cccl/headers/include/cuda/std/__type_traits/is_copy_assignable.h +43 -0
  877. cuda/cccl/headers/include/cuda/std/__type_traits/is_copy_constructible.h +43 -0
  878. cuda/cccl/headers/include/cuda/std/__type_traits/is_core_convertible.h +47 -0
  879. cuda/cccl/headers/include/cuda/std/__type_traits/is_corresponding_member.h +43 -0
  880. cuda/cccl/headers/include/cuda/std/__type_traits/is_default_constructible.h +40 -0
  881. cuda/cccl/headers/include/cuda/std/__type_traits/is_destructible.h +115 -0
  882. cuda/cccl/headers/include/cuda/std/__type_traits/is_empty.h +73 -0
  883. cuda/cccl/headers/include/cuda/std/__type_traits/is_enum.h +68 -0
  884. cuda/cccl/headers/include/cuda/std/__type_traits/is_extended_arithmetic.h +38 -0
  885. cuda/cccl/headers/include/cuda/std/__type_traits/is_extended_floating_point.h +81 -0
  886. cuda/cccl/headers/include/cuda/std/__type_traits/is_final.h +56 -0
  887. cuda/cccl/headers/include/cuda/std/__type_traits/is_floating_point.h +53 -0
  888. cuda/cccl/headers/include/cuda/std/__type_traits/is_function.h +61 -0
  889. cuda/cccl/headers/include/cuda/std/__type_traits/is_fundamental.h +56 -0
  890. cuda/cccl/headers/include/cuda/std/__type_traits/is_implicitly_default_constructible.h +57 -0
  891. cuda/cccl/headers/include/cuda/std/__type_traits/is_integer.h +45 -0
  892. cuda/cccl/headers/include/cuda/std/__type_traits/is_integral.h +123 -0
  893. cuda/cccl/headers/include/cuda/std/__type_traits/is_layout_compatible.h +45 -0
  894. cuda/cccl/headers/include/cuda/std/__type_traits/is_literal_type.h +59 -0
  895. cuda/cccl/headers/include/cuda/std/__type_traits/is_member_function_pointer.h +79 -0
  896. cuda/cccl/headers/include/cuda/std/__type_traits/is_member_object_pointer.h +57 -0
  897. cuda/cccl/headers/include/cuda/std/__type_traits/is_member_pointer.h +57 -0
  898. cuda/cccl/headers/include/cuda/std/__type_traits/is_move_assignable.h +43 -0
  899. cuda/cccl/headers/include/cuda/std/__type_traits/is_move_constructible.h +42 -0
  900. cuda/cccl/headers/include/cuda/std/__type_traits/is_nothrow_assignable.h +70 -0
  901. cuda/cccl/headers/include/cuda/std/__type_traits/is_nothrow_constructible.h +84 -0
  902. cuda/cccl/headers/include/cuda/std/__type_traits/is_nothrow_convertible.h +59 -0
  903. cuda/cccl/headers/include/cuda/std/__type_traits/is_nothrow_copy_assignable.h +60 -0
  904. cuda/cccl/headers/include/cuda/std/__type_traits/is_nothrow_copy_constructible.h +43 -0
  905. cuda/cccl/headers/include/cuda/std/__type_traits/is_nothrow_default_constructible.h +54 -0
  906. cuda/cccl/headers/include/cuda/std/__type_traits/is_nothrow_destructible.h +79 -0
  907. cuda/cccl/headers/include/cuda/std/__type_traits/is_nothrow_move_assignable.h +60 -0
  908. cuda/cccl/headers/include/cuda/std/__type_traits/is_nothrow_move_constructible.h +42 -0
  909. cuda/cccl/headers/include/cuda/std/__type_traits/is_null_pointer.h +43 -0
  910. cuda/cccl/headers/include/cuda/std/__type_traits/is_object.h +57 -0
  911. cuda/cccl/headers/include/cuda/std/__type_traits/is_one_of.h +37 -0
  912. cuda/cccl/headers/include/cuda/std/__type_traits/is_pod.h +62 -0
  913. cuda/cccl/headers/include/cuda/std/__type_traits/is_pointer.h +60 -0
  914. cuda/cccl/headers/include/cuda/std/__type_traits/is_pointer_interconvertible_base_of.h +87 -0
  915. cuda/cccl/headers/include/cuda/std/__type_traits/is_pointer_interconvertible_with_class.h +43 -0
  916. cuda/cccl/headers/include/cuda/std/__type_traits/is_polymorphic.h +63 -0
  917. cuda/cccl/headers/include/cuda/std/__type_traits/is_primary_template.h +119 -0
  918. cuda/cccl/headers/include/cuda/std/__type_traits/is_reference.h +95 -0
  919. cuda/cccl/headers/include/cuda/std/__type_traits/is_reference_wrapper.h +50 -0
  920. cuda/cccl/headers/include/cuda/std/__type_traits/is_referenceable.h +55 -0
  921. cuda/cccl/headers/include/cuda/std/__type_traits/is_same.h +84 -0
  922. cuda/cccl/headers/include/cuda/std/__type_traits/is_scalar.h +60 -0
  923. cuda/cccl/headers/include/cuda/std/__type_traits/is_scoped_enum.h +49 -0
  924. cuda/cccl/headers/include/cuda/std/__type_traits/is_signed.h +65 -0
  925. cuda/cccl/headers/include/cuda/std/__type_traits/is_signed_integer.h +59 -0
  926. cuda/cccl/headers/include/cuda/std/__type_traits/is_standard_layout.h +57 -0
  927. cuda/cccl/headers/include/cuda/std/__type_traits/is_swappable.h +203 -0
  928. cuda/cccl/headers/include/cuda/std/__type_traits/is_trivial.h +56 -0
  929. cuda/cccl/headers/include/cuda/std/__type_traits/is_trivially_assignable.h +70 -0
  930. cuda/cccl/headers/include/cuda/std/__type_traits/is_trivially_constructible.h +82 -0
  931. cuda/cccl/headers/include/cuda/std/__type_traits/is_trivially_copy_assignable.h +60 -0
  932. cuda/cccl/headers/include/cuda/std/__type_traits/is_trivially_copy_constructible.h +61 -0
  933. cuda/cccl/headers/include/cuda/std/__type_traits/is_trivially_copyable.h +56 -0
  934. cuda/cccl/headers/include/cuda/std/__type_traits/is_trivially_default_constructible.h +55 -0
  935. cuda/cccl/headers/include/cuda/std/__type_traits/is_trivially_destructible.h +73 -0
  936. cuda/cccl/headers/include/cuda/std/__type_traits/is_trivially_move_assignable.h +60 -0
  937. cuda/cccl/headers/include/cuda/std/__type_traits/is_trivially_move_constructible.h +58 -0
  938. cuda/cccl/headers/include/cuda/std/__type_traits/is_unbounded_array.h +43 -0
  939. cuda/cccl/headers/include/cuda/std/__type_traits/is_union.h +57 -0
  940. cuda/cccl/headers/include/cuda/std/__type_traits/is_unsigned.h +66 -0
  941. cuda/cccl/headers/include/cuda/std/__type_traits/is_unsigned_integer.h +59 -0
  942. cuda/cccl/headers/include/cuda/std/__type_traits/is_valid_expansion.h +41 -0
  943. cuda/cccl/headers/include/cuda/std/__type_traits/is_void.h +55 -0
  944. cuda/cccl/headers/include/cuda/std/__type_traits/is_volatile.h +56 -0
  945. cuda/cccl/headers/include/cuda/std/__type_traits/lazy.h +35 -0
  946. cuda/cccl/headers/include/cuda/std/__type_traits/make_const_lvalue_ref.h +36 -0
  947. cuda/cccl/headers/include/cuda/std/__type_traits/make_nbit_int.h +107 -0
  948. cuda/cccl/headers/include/cuda/std/__type_traits/make_signed.h +140 -0
  949. cuda/cccl/headers/include/cuda/std/__type_traits/make_unsigned.h +151 -0
  950. cuda/cccl/headers/include/cuda/std/__type_traits/maybe_const.h +36 -0
  951. cuda/cccl/headers/include/cuda/std/__type_traits/nat.h +39 -0
  952. cuda/cccl/headers/include/cuda/std/__type_traits/negation.h +44 -0
  953. cuda/cccl/headers/include/cuda/std/__type_traits/num_bits.h +123 -0
  954. cuda/cccl/headers/include/cuda/std/__type_traits/promote.h +163 -0
  955. cuda/cccl/headers/include/cuda/std/__type_traits/rank.h +60 -0
  956. cuda/cccl/headers/include/cuda/std/__type_traits/reference_constructs_from_temporary.h +57 -0
  957. cuda/cccl/headers/include/cuda/std/__type_traits/reference_converts_from_temporary.h +56 -0
  958. cuda/cccl/headers/include/cuda/std/__type_traits/remove_all_extents.h +66 -0
  959. cuda/cccl/headers/include/cuda/std/__type_traits/remove_const.h +59 -0
  960. cuda/cccl/headers/include/cuda/std/__type_traits/remove_const_ref.h +37 -0
  961. cuda/cccl/headers/include/cuda/std/__type_traits/remove_cv.h +57 -0
  962. cuda/cccl/headers/include/cuda/std/__type_traits/remove_cvref.h +57 -0
  963. cuda/cccl/headers/include/cuda/std/__type_traits/remove_extent.h +65 -0
  964. cuda/cccl/headers/include/cuda/std/__type_traits/remove_pointer.h +73 -0
  965. cuda/cccl/headers/include/cuda/std/__type_traits/remove_reference.h +72 -0
  966. cuda/cccl/headers/include/cuda/std/__type_traits/remove_volatile.h +58 -0
  967. cuda/cccl/headers/include/cuda/std/__type_traits/result_of.h +47 -0
  968. cuda/cccl/headers/include/cuda/std/__type_traits/type_identity.h +40 -0
  969. cuda/cccl/headers/include/cuda/std/__type_traits/type_list.h +1069 -0
  970. cuda/cccl/headers/include/cuda/std/__type_traits/type_set.h +132 -0
  971. cuda/cccl/headers/include/cuda/std/__type_traits/underlying_type.h +66 -0
  972. cuda/cccl/headers/include/cuda/std/__type_traits/void_t.h +34 -0
  973. cuda/cccl/headers/include/cuda/std/__utility/as_const.h +52 -0
  974. cuda/cccl/headers/include/cuda/std/__utility/auto_cast.h +32 -0
  975. cuda/cccl/headers/include/cuda/std/__utility/cmp.h +116 -0
  976. cuda/cccl/headers/include/cuda/std/__utility/convert_to_integral.h +103 -0
  977. cuda/cccl/headers/include/cuda/std/__utility/declval.h +63 -0
  978. cuda/cccl/headers/include/cuda/std/__utility/exception_guard.h +162 -0
  979. cuda/cccl/headers/include/cuda/std/__utility/exchange.h +46 -0
  980. cuda/cccl/headers/include/cuda/std/__utility/forward.h +59 -0
  981. cuda/cccl/headers/include/cuda/std/__utility/forward_like.h +56 -0
  982. cuda/cccl/headers/include/cuda/std/__utility/in_place.h +77 -0
  983. cuda/cccl/headers/include/cuda/std/__utility/integer_sequence.h +251 -0
  984. cuda/cccl/headers/include/cuda/std/__utility/monostate.h +99 -0
  985. cuda/cccl/headers/include/cuda/std/__utility/move.h +75 -0
  986. cuda/cccl/headers/include/cuda/std/__utility/pair.h +808 -0
  987. cuda/cccl/headers/include/cuda/std/__utility/piecewise_construct.h +37 -0
  988. cuda/cccl/headers/include/cuda/std/__utility/pod_tuple.h +763 -0
  989. cuda/cccl/headers/include/cuda/std/__utility/priority_tag.h +40 -0
  990. cuda/cccl/headers/include/cuda/std/__utility/rel_ops.h +63 -0
  991. cuda/cccl/headers/include/cuda/std/__utility/swap.h +65 -0
  992. cuda/cccl/headers/include/cuda/std/__utility/to_underlying.h +40 -0
  993. cuda/cccl/headers/include/cuda/std/__utility/typeid.h +425 -0
  994. cuda/cccl/headers/include/cuda/std/__utility/unreachable.h +37 -0
  995. cuda/cccl/headers/include/cuda/std/array +527 -0
  996. cuda/cccl/headers/include/cuda/std/atomic +823 -0
  997. cuda/cccl/headers/include/cuda/std/barrier +43 -0
  998. cuda/cccl/headers/include/cuda/std/bit +35 -0
  999. cuda/cccl/headers/include/cuda/std/bitset +1026 -0
  1000. cuda/cccl/headers/include/cuda/std/cassert +28 -0
  1001. cuda/cccl/headers/include/cuda/std/ccomplex +15 -0
  1002. cuda/cccl/headers/include/cuda/std/cfloat +59 -0
  1003. cuda/cccl/headers/include/cuda/std/chrono +26 -0
  1004. cuda/cccl/headers/include/cuda/std/climits +61 -0
  1005. cuda/cccl/headers/include/cuda/std/cmath +25 -0
  1006. cuda/cccl/headers/include/cuda/std/complex +25 -0
  1007. cuda/cccl/headers/include/cuda/std/concepts +48 -0
  1008. cuda/cccl/headers/include/cuda/std/cstddef +28 -0
  1009. cuda/cccl/headers/include/cuda/std/cstdint +178 -0
  1010. cuda/cccl/headers/include/cuda/std/cstdlib +30 -0
  1011. cuda/cccl/headers/include/cuda/std/cstring +111 -0
  1012. cuda/cccl/headers/include/cuda/std/ctime +147 -0
  1013. cuda/cccl/headers/include/cuda/std/detail/__config +45 -0
  1014. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/__config +258 -0
  1015. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/algorithm +2692 -0
  1016. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/chrono +3689 -0
  1017. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/cmath +685 -0
  1018. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/complex +1610 -0
  1019. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/iosfwd +128 -0
  1020. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/optional +1786 -0
  1021. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/stdexcept +120 -0
  1022. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/tuple +1378 -0
  1023. cuda/cccl/headers/include/cuda/std/detail/libcxx/include/variant +2160 -0
  1024. cuda/cccl/headers/include/cuda/std/execution +27 -0
  1025. cuda/cccl/headers/include/cuda/std/expected +30 -0
  1026. cuda/cccl/headers/include/cuda/std/functional +56 -0
  1027. cuda/cccl/headers/include/cuda/std/initializer_list +36 -0
  1028. cuda/cccl/headers/include/cuda/std/inplace_vector +2171 -0
  1029. cuda/cccl/headers/include/cuda/std/iterator +70 -0
  1030. cuda/cccl/headers/include/cuda/std/latch +34 -0
  1031. cuda/cccl/headers/include/cuda/std/limits +28 -0
  1032. cuda/cccl/headers/include/cuda/std/linalg +30 -0
  1033. cuda/cccl/headers/include/cuda/std/mdspan +38 -0
  1034. cuda/cccl/headers/include/cuda/std/memory +39 -0
  1035. cuda/cccl/headers/include/cuda/std/numbers +335 -0
  1036. cuda/cccl/headers/include/cuda/std/numeric +41 -0
  1037. cuda/cccl/headers/include/cuda/std/optional +25 -0
  1038. cuda/cccl/headers/include/cuda/std/ranges +68 -0
  1039. cuda/cccl/headers/include/cuda/std/ratio +417 -0
  1040. cuda/cccl/headers/include/cuda/std/semaphore +31 -0
  1041. cuda/cccl/headers/include/cuda/std/source_location +83 -0
  1042. cuda/cccl/headers/include/cuda/std/span +640 -0
  1043. cuda/cccl/headers/include/cuda/std/string_view +814 -0
  1044. cuda/cccl/headers/include/cuda/std/tuple +26 -0
  1045. cuda/cccl/headers/include/cuda/std/type_traits +176 -0
  1046. cuda/cccl/headers/include/cuda/std/utility +70 -0
  1047. cuda/cccl/headers/include/cuda/std/variant +25 -0
  1048. cuda/cccl/headers/include/cuda/std/version +245 -0
  1049. cuda/cccl/headers/include/cuda/stream_ref +54 -0
  1050. cuda/cccl/headers/include/cuda/type_traits +27 -0
  1051. cuda/cccl/headers/include/cuda/version +16 -0
  1052. cuda/cccl/headers/include/cuda/warp +28 -0
  1053. cuda/cccl/headers/include/cuda/work_stealing +26 -0
  1054. cuda/cccl/headers/include/nv/detail/__preprocessor +169 -0
  1055. cuda/cccl/headers/include/nv/detail/__target_macros +599 -0
  1056. cuda/cccl/headers/include/nv/target +229 -0
  1057. cuda/cccl/headers/include/thrust/addressof.h +22 -0
  1058. cuda/cccl/headers/include/thrust/adjacent_difference.h +254 -0
  1059. cuda/cccl/headers/include/thrust/advance.h +59 -0
  1060. cuda/cccl/headers/include/thrust/allocate_unique.h +299 -0
  1061. cuda/cccl/headers/include/thrust/binary_search.h +1910 -0
  1062. cuda/cccl/headers/include/thrust/complex.h +859 -0
  1063. cuda/cccl/headers/include/thrust/copy.h +506 -0
  1064. cuda/cccl/headers/include/thrust/count.h +245 -0
  1065. cuda/cccl/headers/include/thrust/detail/adjacent_difference.inl +95 -0
  1066. cuda/cccl/headers/include/thrust/detail/algorithm_wrapper.h +37 -0
  1067. cuda/cccl/headers/include/thrust/detail/alignment.h +81 -0
  1068. cuda/cccl/headers/include/thrust/detail/allocator/allocator_traits.h +350 -0
  1069. cuda/cccl/headers/include/thrust/detail/allocator/allocator_traits.inl +371 -0
  1070. cuda/cccl/headers/include/thrust/detail/allocator/copy_construct_range.h +45 -0
  1071. cuda/cccl/headers/include/thrust/detail/allocator/copy_construct_range.inl +242 -0
  1072. cuda/cccl/headers/include/thrust/detail/allocator/destroy_range.h +39 -0
  1073. cuda/cccl/headers/include/thrust/detail/allocator/destroy_range.inl +137 -0
  1074. cuda/cccl/headers/include/thrust/detail/allocator/fill_construct_range.h +39 -0
  1075. cuda/cccl/headers/include/thrust/detail/allocator/fill_construct_range.inl +99 -0
  1076. cuda/cccl/headers/include/thrust/detail/allocator/malloc_allocator.h +53 -0
  1077. cuda/cccl/headers/include/thrust/detail/allocator/malloc_allocator.inl +68 -0
  1078. cuda/cccl/headers/include/thrust/detail/allocator/no_throw_allocator.h +76 -0
  1079. cuda/cccl/headers/include/thrust/detail/allocator/tagged_allocator.h +102 -0
  1080. cuda/cccl/headers/include/thrust/detail/allocator/tagged_allocator.inl +86 -0
  1081. cuda/cccl/headers/include/thrust/detail/allocator/temporary_allocator.h +79 -0
  1082. cuda/cccl/headers/include/thrust/detail/allocator/temporary_allocator.inl +81 -0
  1083. cuda/cccl/headers/include/thrust/detail/allocator/value_initialize_range.h +39 -0
  1084. cuda/cccl/headers/include/thrust/detail/allocator/value_initialize_range.inl +98 -0
  1085. cuda/cccl/headers/include/thrust/detail/allocator_aware_execution_policy.h +99 -0
  1086. cuda/cccl/headers/include/thrust/detail/binary_search.inl +525 -0
  1087. cuda/cccl/headers/include/thrust/detail/caching_allocator.h +47 -0
  1088. cuda/cccl/headers/include/thrust/detail/complex/arithmetic.h +255 -0
  1089. cuda/cccl/headers/include/thrust/detail/complex/c99math.h +64 -0
  1090. cuda/cccl/headers/include/thrust/detail/complex/catrig.h +875 -0
  1091. cuda/cccl/headers/include/thrust/detail/complex/catrigf.h +589 -0
  1092. cuda/cccl/headers/include/thrust/detail/complex/ccosh.h +233 -0
  1093. cuda/cccl/headers/include/thrust/detail/complex/ccoshf.h +161 -0
  1094. cuda/cccl/headers/include/thrust/detail/complex/cexp.h +195 -0
  1095. cuda/cccl/headers/include/thrust/detail/complex/cexpf.h +173 -0
  1096. cuda/cccl/headers/include/thrust/detail/complex/clog.h +223 -0
  1097. cuda/cccl/headers/include/thrust/detail/complex/clogf.h +210 -0
  1098. cuda/cccl/headers/include/thrust/detail/complex/complex.inl +263 -0
  1099. cuda/cccl/headers/include/thrust/detail/complex/cpow.h +50 -0
  1100. cuda/cccl/headers/include/thrust/detail/complex/cproj.h +81 -0
  1101. cuda/cccl/headers/include/thrust/detail/complex/csinh.h +228 -0
  1102. cuda/cccl/headers/include/thrust/detail/complex/csinhf.h +168 -0
  1103. cuda/cccl/headers/include/thrust/detail/complex/csqrt.h +178 -0
  1104. cuda/cccl/headers/include/thrust/detail/complex/csqrtf.h +174 -0
  1105. cuda/cccl/headers/include/thrust/detail/complex/ctanh.h +208 -0
  1106. cuda/cccl/headers/include/thrust/detail/complex/ctanhf.h +133 -0
  1107. cuda/cccl/headers/include/thrust/detail/complex/math_private.h +138 -0
  1108. cuda/cccl/headers/include/thrust/detail/complex/stream.h +73 -0
  1109. cuda/cccl/headers/include/thrust/detail/config/compiler.h +38 -0
  1110. cuda/cccl/headers/include/thrust/detail/config/config.h +43 -0
  1111. cuda/cccl/headers/include/thrust/detail/config/cpp_dialect.h +78 -0
  1112. cuda/cccl/headers/include/thrust/detail/config/device_system.h +55 -0
  1113. cuda/cccl/headers/include/thrust/detail/config/host_system.h +48 -0
  1114. cuda/cccl/headers/include/thrust/detail/config/memory_resource.h +41 -0
  1115. cuda/cccl/headers/include/thrust/detail/config/namespace.h +162 -0
  1116. cuda/cccl/headers/include/thrust/detail/config/simple_defines.h +48 -0
  1117. cuda/cccl/headers/include/thrust/detail/config.h +36 -0
  1118. cuda/cccl/headers/include/thrust/detail/contiguous_storage.h +228 -0
  1119. cuda/cccl/headers/include/thrust/detail/contiguous_storage.inl +273 -0
  1120. cuda/cccl/headers/include/thrust/detail/copy.h +72 -0
  1121. cuda/cccl/headers/include/thrust/detail/copy.inl +129 -0
  1122. cuda/cccl/headers/include/thrust/detail/copy_if.h +62 -0
  1123. cuda/cccl/headers/include/thrust/detail/copy_if.inl +102 -0
  1124. cuda/cccl/headers/include/thrust/detail/count.h +55 -0
  1125. cuda/cccl/headers/include/thrust/detail/count.inl +89 -0
  1126. cuda/cccl/headers/include/thrust/detail/device_delete.inl +52 -0
  1127. cuda/cccl/headers/include/thrust/detail/device_free.inl +47 -0
  1128. cuda/cccl/headers/include/thrust/detail/device_malloc.inl +60 -0
  1129. cuda/cccl/headers/include/thrust/detail/device_new.inl +61 -0
  1130. cuda/cccl/headers/include/thrust/detail/device_ptr.inl +48 -0
  1131. cuda/cccl/headers/include/thrust/detail/equal.inl +93 -0
  1132. cuda/cccl/headers/include/thrust/detail/event_error.h +160 -0
  1133. cuda/cccl/headers/include/thrust/detail/execute_with_allocator.h +80 -0
  1134. cuda/cccl/headers/include/thrust/detail/execute_with_allocator_fwd.h +61 -0
  1135. cuda/cccl/headers/include/thrust/detail/execution_policy.h +80 -0
  1136. cuda/cccl/headers/include/thrust/detail/extrema.inl +184 -0
  1137. cuda/cccl/headers/include/thrust/detail/fill.inl +86 -0
  1138. cuda/cccl/headers/include/thrust/detail/find.inl +113 -0
  1139. cuda/cccl/headers/include/thrust/detail/for_each.inl +84 -0
  1140. cuda/cccl/headers/include/thrust/detail/function.h +49 -0
  1141. cuda/cccl/headers/include/thrust/detail/functional/actor.h +214 -0
  1142. cuda/cccl/headers/include/thrust/detail/functional/operators.h +386 -0
  1143. cuda/cccl/headers/include/thrust/detail/gather.inl +173 -0
  1144. cuda/cccl/headers/include/thrust/detail/generate.inl +86 -0
  1145. cuda/cccl/headers/include/thrust/detail/get_iterator_value.h +62 -0
  1146. cuda/cccl/headers/include/thrust/detail/inner_product.inl +118 -0
  1147. cuda/cccl/headers/include/thrust/detail/integer_math.h +130 -0
  1148. cuda/cccl/headers/include/thrust/detail/internal_functional.h +285 -0
  1149. cuda/cccl/headers/include/thrust/detail/logical.inl +113 -0
  1150. cuda/cccl/headers/include/thrust/detail/malloc_and_free.h +92 -0
  1151. cuda/cccl/headers/include/thrust/detail/malloc_and_free_fwd.h +45 -0
  1152. cuda/cccl/headers/include/thrust/detail/memory_algorithms.h +209 -0
  1153. cuda/cccl/headers/include/thrust/detail/memory_wrapper.h +40 -0
  1154. cuda/cccl/headers/include/thrust/detail/merge.inl +276 -0
  1155. cuda/cccl/headers/include/thrust/detail/mismatch.inl +94 -0
  1156. cuda/cccl/headers/include/thrust/detail/mpl/math.h +164 -0
  1157. cuda/cccl/headers/include/thrust/detail/numeric_wrapper.h +37 -0
  1158. cuda/cccl/headers/include/thrust/detail/overlapped_copy.h +124 -0
  1159. cuda/cccl/headers/include/thrust/detail/partition.inl +378 -0
  1160. cuda/cccl/headers/include/thrust/detail/pointer.h +217 -0
  1161. cuda/cccl/headers/include/thrust/detail/pointer.inl +172 -0
  1162. cuda/cccl/headers/include/thrust/detail/preprocessor.h +652 -0
  1163. cuda/cccl/headers/include/thrust/detail/random_bijection.h +177 -0
  1164. cuda/cccl/headers/include/thrust/detail/range/head_flags.h +116 -0
  1165. cuda/cccl/headers/include/thrust/detail/range/tail_flags.h +130 -0
  1166. cuda/cccl/headers/include/thrust/detail/raw_pointer_cast.h +52 -0
  1167. cuda/cccl/headers/include/thrust/detail/raw_reference_cast.h +189 -0
  1168. cuda/cccl/headers/include/thrust/detail/reduce.inl +377 -0
  1169. cuda/cccl/headers/include/thrust/detail/reference.h +500 -0
  1170. cuda/cccl/headers/include/thrust/detail/reference_forward_declaration.h +35 -0
  1171. cuda/cccl/headers/include/thrust/detail/remove.inl +213 -0
  1172. cuda/cccl/headers/include/thrust/detail/replace.inl +231 -0
  1173. cuda/cccl/headers/include/thrust/detail/reverse.inl +88 -0
  1174. cuda/cccl/headers/include/thrust/detail/scan.inl +518 -0
  1175. cuda/cccl/headers/include/thrust/detail/scatter.inl +157 -0
  1176. cuda/cccl/headers/include/thrust/detail/seq.h +54 -0
  1177. cuda/cccl/headers/include/thrust/detail/sequence.inl +109 -0
  1178. cuda/cccl/headers/include/thrust/detail/set_operations.inl +981 -0
  1179. cuda/cccl/headers/include/thrust/detail/shuffle.inl +86 -0
  1180. cuda/cccl/headers/include/thrust/detail/sort.inl +373 -0
  1181. cuda/cccl/headers/include/thrust/detail/static_assert.h +58 -0
  1182. cuda/cccl/headers/include/thrust/detail/static_map.h +167 -0
  1183. cuda/cccl/headers/include/thrust/detail/swap_ranges.inl +65 -0
  1184. cuda/cccl/headers/include/thrust/detail/tabulate.inl +62 -0
  1185. cuda/cccl/headers/include/thrust/detail/temporary_array.h +153 -0
  1186. cuda/cccl/headers/include/thrust/detail/temporary_array.inl +138 -0
  1187. cuda/cccl/headers/include/thrust/detail/temporary_buffer.h +81 -0
  1188. cuda/cccl/headers/include/thrust/detail/transform.inl +250 -0
  1189. cuda/cccl/headers/include/thrust/detail/transform_reduce.inl +69 -0
  1190. cuda/cccl/headers/include/thrust/detail/transform_scan.inl +161 -0
  1191. cuda/cccl/headers/include/thrust/detail/trivial_sequence.h +131 -0
  1192. cuda/cccl/headers/include/thrust/detail/tuple_meta_transform.h +61 -0
  1193. cuda/cccl/headers/include/thrust/detail/type_deduction.h +62 -0
  1194. cuda/cccl/headers/include/thrust/detail/type_traits/has_member_function.h +47 -0
  1195. cuda/cccl/headers/include/thrust/detail/type_traits/has_nested_type.h +43 -0
  1196. cuda/cccl/headers/include/thrust/detail/type_traits/is_call_possible.h +167 -0
  1197. cuda/cccl/headers/include/thrust/detail/type_traits/is_commutative.h +69 -0
  1198. cuda/cccl/headers/include/thrust/detail/type_traits/is_metafunction_defined.h +39 -0
  1199. cuda/cccl/headers/include/thrust/detail/type_traits/is_thrust_pointer.h +60 -0
  1200. cuda/cccl/headers/include/thrust/detail/type_traits/iterator/is_discard_iterator.h +44 -0
  1201. cuda/cccl/headers/include/thrust/detail/type_traits/iterator/is_output_iterator.h +46 -0
  1202. cuda/cccl/headers/include/thrust/detail/type_traits/minimum_type.h +89 -0
  1203. cuda/cccl/headers/include/thrust/detail/type_traits/pointer_traits.h +332 -0
  1204. cuda/cccl/headers/include/thrust/detail/type_traits.h +136 -0
  1205. cuda/cccl/headers/include/thrust/detail/uninitialized_copy.inl +90 -0
  1206. cuda/cccl/headers/include/thrust/detail/uninitialized_fill.inl +86 -0
  1207. cuda/cccl/headers/include/thrust/detail/unique.inl +373 -0
  1208. cuda/cccl/headers/include/thrust/detail/use_default.h +34 -0
  1209. cuda/cccl/headers/include/thrust/detail/util/align.h +59 -0
  1210. cuda/cccl/headers/include/thrust/detail/vector_base.h +630 -0
  1211. cuda/cccl/headers/include/thrust/detail/vector_base.inl +1242 -0
  1212. cuda/cccl/headers/include/thrust/device_allocator.h +134 -0
  1213. cuda/cccl/headers/include/thrust/device_delete.h +59 -0
  1214. cuda/cccl/headers/include/thrust/device_free.h +72 -0
  1215. cuda/cccl/headers/include/thrust/device_make_unique.h +56 -0
  1216. cuda/cccl/headers/include/thrust/device_malloc.h +108 -0
  1217. cuda/cccl/headers/include/thrust/device_malloc_allocator.h +190 -0
  1218. cuda/cccl/headers/include/thrust/device_new.h +91 -0
  1219. cuda/cccl/headers/include/thrust/device_new_allocator.h +179 -0
  1220. cuda/cccl/headers/include/thrust/device_ptr.h +202 -0
  1221. cuda/cccl/headers/include/thrust/device_reference.h +986 -0
  1222. cuda/cccl/headers/include/thrust/device_vector.h +574 -0
  1223. cuda/cccl/headers/include/thrust/distance.h +43 -0
  1224. cuda/cccl/headers/include/thrust/equal.h +247 -0
  1225. cuda/cccl/headers/include/thrust/execution_policy.h +384 -0
  1226. cuda/cccl/headers/include/thrust/extrema.h +657 -0
  1227. cuda/cccl/headers/include/thrust/fill.h +201 -0
  1228. cuda/cccl/headers/include/thrust/find.h +382 -0
  1229. cuda/cccl/headers/include/thrust/for_each.h +261 -0
  1230. cuda/cccl/headers/include/thrust/functional.h +396 -0
  1231. cuda/cccl/headers/include/thrust/gather.h +464 -0
  1232. cuda/cccl/headers/include/thrust/generate.h +193 -0
  1233. cuda/cccl/headers/include/thrust/host_vector.h +576 -0
  1234. cuda/cccl/headers/include/thrust/inner_product.h +264 -0
  1235. cuda/cccl/headers/include/thrust/iterator/constant_iterator.h +219 -0
  1236. cuda/cccl/headers/include/thrust/iterator/counting_iterator.h +335 -0
  1237. cuda/cccl/headers/include/thrust/iterator/detail/any_assign.h +48 -0
  1238. cuda/cccl/headers/include/thrust/iterator/detail/any_system_tag.h +43 -0
  1239. cuda/cccl/headers/include/thrust/iterator/detail/device_system_tag.h +38 -0
  1240. cuda/cccl/headers/include/thrust/iterator/detail/host_system_tag.h +38 -0
  1241. cuda/cccl/headers/include/thrust/iterator/detail/iterator_adaptor_base.h +81 -0
  1242. cuda/cccl/headers/include/thrust/iterator/detail/iterator_category_to_system.h +51 -0
  1243. cuda/cccl/headers/include/thrust/iterator/detail/iterator_category_to_traversal.h +62 -0
  1244. cuda/cccl/headers/include/thrust/iterator/detail/iterator_category_with_system_and_traversal.h +57 -0
  1245. cuda/cccl/headers/include/thrust/iterator/detail/iterator_facade_category.h +199 -0
  1246. cuda/cccl/headers/include/thrust/iterator/detail/iterator_traversal_tags.h +50 -0
  1247. cuda/cccl/headers/include/thrust/iterator/detail/minimum_system.h +53 -0
  1248. cuda/cccl/headers/include/thrust/iterator/detail/normal_iterator.h +69 -0
  1249. cuda/cccl/headers/include/thrust/iterator/detail/retag.h +104 -0
  1250. cuda/cccl/headers/include/thrust/iterator/detail/tagged_iterator.h +81 -0
  1251. cuda/cccl/headers/include/thrust/iterator/detail/tuple_of_iterator_references.h +174 -0
  1252. cuda/cccl/headers/include/thrust/iterator/discard_iterator.h +164 -0
  1253. cuda/cccl/headers/include/thrust/iterator/iterator_adaptor.h +251 -0
  1254. cuda/cccl/headers/include/thrust/iterator/iterator_categories.h +215 -0
  1255. cuda/cccl/headers/include/thrust/iterator/iterator_facade.h +660 -0
  1256. cuda/cccl/headers/include/thrust/iterator/iterator_traits.h +245 -0
  1257. cuda/cccl/headers/include/thrust/iterator/offset_iterator.h +192 -0
  1258. cuda/cccl/headers/include/thrust/iterator/permutation_iterator.h +204 -0
  1259. cuda/cccl/headers/include/thrust/iterator/retag.h +74 -0
  1260. cuda/cccl/headers/include/thrust/iterator/reverse_iterator.h +221 -0
  1261. cuda/cccl/headers/include/thrust/iterator/shuffle_iterator.h +184 -0
  1262. cuda/cccl/headers/include/thrust/iterator/strided_iterator.h +152 -0
  1263. cuda/cccl/headers/include/thrust/iterator/tabulate_output_iterator.h +149 -0
  1264. cuda/cccl/headers/include/thrust/iterator/transform_input_output_iterator.h +226 -0
  1265. cuda/cccl/headers/include/thrust/iterator/transform_iterator.h +351 -0
  1266. cuda/cccl/headers/include/thrust/iterator/transform_output_iterator.h +190 -0
  1267. cuda/cccl/headers/include/thrust/iterator/zip_iterator.h +357 -0
  1268. cuda/cccl/headers/include/thrust/logical.h +290 -0
  1269. cuda/cccl/headers/include/thrust/memory.h +395 -0
  1270. cuda/cccl/headers/include/thrust/merge.h +725 -0
  1271. cuda/cccl/headers/include/thrust/mismatch.h +261 -0
  1272. cuda/cccl/headers/include/thrust/mr/allocator.h +229 -0
  1273. cuda/cccl/headers/include/thrust/mr/device_memory_resource.h +41 -0
  1274. cuda/cccl/headers/include/thrust/mr/disjoint_pool.h +526 -0
  1275. cuda/cccl/headers/include/thrust/mr/disjoint_sync_pool.h +118 -0
  1276. cuda/cccl/headers/include/thrust/mr/disjoint_tls_pool.h +68 -0
  1277. cuda/cccl/headers/include/thrust/mr/fancy_pointer_resource.h +67 -0
  1278. cuda/cccl/headers/include/thrust/mr/host_memory_resource.h +38 -0
  1279. cuda/cccl/headers/include/thrust/mr/memory_resource.h +217 -0
  1280. cuda/cccl/headers/include/thrust/mr/new.h +100 -0
  1281. cuda/cccl/headers/include/thrust/mr/polymorphic_adaptor.h +63 -0
  1282. cuda/cccl/headers/include/thrust/mr/pool.h +526 -0
  1283. cuda/cccl/headers/include/thrust/mr/pool_options.h +174 -0
  1284. cuda/cccl/headers/include/thrust/mr/sync_pool.h +114 -0
  1285. cuda/cccl/headers/include/thrust/mr/tls_pool.h +65 -0
  1286. cuda/cccl/headers/include/thrust/mr/universal_memory_resource.h +29 -0
  1287. cuda/cccl/headers/include/thrust/mr/validator.h +56 -0
  1288. cuda/cccl/headers/include/thrust/pair.h +102 -0
  1289. cuda/cccl/headers/include/thrust/partition.h +1383 -0
  1290. cuda/cccl/headers/include/thrust/per_device_resource.h +98 -0
  1291. cuda/cccl/headers/include/thrust/random/detail/discard_block_engine.inl +184 -0
  1292. cuda/cccl/headers/include/thrust/random/detail/linear_congruential_engine.inl +155 -0
  1293. cuda/cccl/headers/include/thrust/random/detail/linear_congruential_engine_discard.h +104 -0
  1294. cuda/cccl/headers/include/thrust/random/detail/linear_feedback_shift_engine.inl +151 -0
  1295. cuda/cccl/headers/include/thrust/random/detail/linear_feedback_shift_engine_wordmask.h +53 -0
  1296. cuda/cccl/headers/include/thrust/random/detail/mod.h +101 -0
  1297. cuda/cccl/headers/include/thrust/random/detail/normal_distribution.inl +187 -0
  1298. cuda/cccl/headers/include/thrust/random/detail/normal_distribution_base.h +160 -0
  1299. cuda/cccl/headers/include/thrust/random/detail/random_core_access.h +63 -0
  1300. cuda/cccl/headers/include/thrust/random/detail/subtract_with_carry_engine.inl +201 -0
  1301. cuda/cccl/headers/include/thrust/random/detail/uniform_int_distribution.inl +198 -0
  1302. cuda/cccl/headers/include/thrust/random/detail/uniform_real_distribution.inl +198 -0
  1303. cuda/cccl/headers/include/thrust/random/detail/xor_combine_engine.inl +183 -0
  1304. cuda/cccl/headers/include/thrust/random/detail/xor_combine_engine_max.h +217 -0
  1305. cuda/cccl/headers/include/thrust/random/discard_block_engine.h +240 -0
  1306. cuda/cccl/headers/include/thrust/random/linear_congruential_engine.h +289 -0
  1307. cuda/cccl/headers/include/thrust/random/linear_feedback_shift_engine.h +217 -0
  1308. cuda/cccl/headers/include/thrust/random/normal_distribution.h +257 -0
  1309. cuda/cccl/headers/include/thrust/random/subtract_with_carry_engine.h +247 -0
  1310. cuda/cccl/headers/include/thrust/random/uniform_int_distribution.h +261 -0
  1311. cuda/cccl/headers/include/thrust/random/uniform_real_distribution.h +258 -0
  1312. cuda/cccl/headers/include/thrust/random/xor_combine_engine.h +255 -0
  1313. cuda/cccl/headers/include/thrust/random.h +120 -0
  1314. cuda/cccl/headers/include/thrust/reduce.h +1112 -0
  1315. cuda/cccl/headers/include/thrust/remove.h +768 -0
  1316. cuda/cccl/headers/include/thrust/replace.h +827 -0
  1317. cuda/cccl/headers/include/thrust/reverse.h +213 -0
  1318. cuda/cccl/headers/include/thrust/scan.h +1671 -0
  1319. cuda/cccl/headers/include/thrust/scatter.h +446 -0
  1320. cuda/cccl/headers/include/thrust/sequence.h +277 -0
  1321. cuda/cccl/headers/include/thrust/set_operations.h +3026 -0
  1322. cuda/cccl/headers/include/thrust/shuffle.h +182 -0
  1323. cuda/cccl/headers/include/thrust/sort.h +1320 -0
  1324. cuda/cccl/headers/include/thrust/swap.h +147 -0
  1325. cuda/cccl/headers/include/thrust/system/cpp/detail/adjacent_difference.h +30 -0
  1326. cuda/cccl/headers/include/thrust/system/cpp/detail/assign_value.h +30 -0
  1327. cuda/cccl/headers/include/thrust/system/cpp/detail/binary_search.h +32 -0
  1328. cuda/cccl/headers/include/thrust/system/cpp/detail/copy.h +30 -0
  1329. cuda/cccl/headers/include/thrust/system/cpp/detail/copy_if.h +30 -0
  1330. cuda/cccl/headers/include/thrust/system/cpp/detail/count.h +29 -0
  1331. cuda/cccl/headers/include/thrust/system/cpp/detail/equal.h +29 -0
  1332. cuda/cccl/headers/include/thrust/system/cpp/detail/execution_policy.h +90 -0
  1333. cuda/cccl/headers/include/thrust/system/cpp/detail/extrema.h +30 -0
  1334. cuda/cccl/headers/include/thrust/system/cpp/detail/fill.h +29 -0
  1335. cuda/cccl/headers/include/thrust/system/cpp/detail/find.h +30 -0
  1336. cuda/cccl/headers/include/thrust/system/cpp/detail/for_each.h +30 -0
  1337. cuda/cccl/headers/include/thrust/system/cpp/detail/gather.h +29 -0
  1338. cuda/cccl/headers/include/thrust/system/cpp/detail/generate.h +29 -0
  1339. cuda/cccl/headers/include/thrust/system/cpp/detail/get_value.h +30 -0
  1340. cuda/cccl/headers/include/thrust/system/cpp/detail/inner_product.h +29 -0
  1341. cuda/cccl/headers/include/thrust/system/cpp/detail/iter_swap.h +30 -0
  1342. cuda/cccl/headers/include/thrust/system/cpp/detail/logical.h +29 -0
  1343. cuda/cccl/headers/include/thrust/system/cpp/detail/malloc_and_free.h +30 -0
  1344. cuda/cccl/headers/include/thrust/system/cpp/detail/memory.inl +60 -0
  1345. cuda/cccl/headers/include/thrust/system/cpp/detail/merge.h +30 -0
  1346. cuda/cccl/headers/include/thrust/system/cpp/detail/mismatch.h +29 -0
  1347. cuda/cccl/headers/include/thrust/system/cpp/detail/par.h +62 -0
  1348. cuda/cccl/headers/include/thrust/system/cpp/detail/partition.h +30 -0
  1349. cuda/cccl/headers/include/thrust/system/cpp/detail/per_device_resource.h +29 -0
  1350. cuda/cccl/headers/include/thrust/system/cpp/detail/reduce.h +30 -0
  1351. cuda/cccl/headers/include/thrust/system/cpp/detail/reduce_by_key.h +30 -0
  1352. cuda/cccl/headers/include/thrust/system/cpp/detail/remove.h +30 -0
  1353. cuda/cccl/headers/include/thrust/system/cpp/detail/replace.h +29 -0
  1354. cuda/cccl/headers/include/thrust/system/cpp/detail/reverse.h +29 -0
  1355. cuda/cccl/headers/include/thrust/system/cpp/detail/scan.h +30 -0
  1356. cuda/cccl/headers/include/thrust/system/cpp/detail/scan_by_key.h +30 -0
  1357. cuda/cccl/headers/include/thrust/system/cpp/detail/scatter.h +29 -0
  1358. cuda/cccl/headers/include/thrust/system/cpp/detail/sequence.h +29 -0
  1359. cuda/cccl/headers/include/thrust/system/cpp/detail/set_operations.h +30 -0
  1360. cuda/cccl/headers/include/thrust/system/cpp/detail/sort.h +30 -0
  1361. cuda/cccl/headers/include/thrust/system/cpp/detail/swap_ranges.h +29 -0
  1362. cuda/cccl/headers/include/thrust/system/cpp/detail/tabulate.h +29 -0
  1363. cuda/cccl/headers/include/thrust/system/cpp/detail/temporary_buffer.h +29 -0
  1364. cuda/cccl/headers/include/thrust/system/cpp/detail/transform.h +29 -0
  1365. cuda/cccl/headers/include/thrust/system/cpp/detail/transform_reduce.h +29 -0
  1366. cuda/cccl/headers/include/thrust/system/cpp/detail/transform_scan.h +29 -0
  1367. cuda/cccl/headers/include/thrust/system/cpp/detail/uninitialized_copy.h +29 -0
  1368. cuda/cccl/headers/include/thrust/system/cpp/detail/uninitialized_fill.h +29 -0
  1369. cuda/cccl/headers/include/thrust/system/cpp/detail/unique.h +30 -0
  1370. cuda/cccl/headers/include/thrust/system/cpp/detail/unique_by_key.h +30 -0
  1371. cuda/cccl/headers/include/thrust/system/cpp/detail/vector.inl +130 -0
  1372. cuda/cccl/headers/include/thrust/system/cpp/execution_policy.h +161 -0
  1373. cuda/cccl/headers/include/thrust/system/cpp/memory.h +109 -0
  1374. cuda/cccl/headers/include/thrust/system/cpp/memory_resource.h +75 -0
  1375. cuda/cccl/headers/include/thrust/system/cpp/pointer.h +119 -0
  1376. cuda/cccl/headers/include/thrust/system/cpp/vector.h +99 -0
  1377. cuda/cccl/headers/include/thrust/system/cuda/config.h +123 -0
  1378. cuda/cccl/headers/include/thrust/system/cuda/detail/adjacent_difference.h +219 -0
  1379. cuda/cccl/headers/include/thrust/system/cuda/detail/assign_value.h +124 -0
  1380. cuda/cccl/headers/include/thrust/system/cuda/detail/binary_search.h +29 -0
  1381. cuda/cccl/headers/include/thrust/system/cuda/detail/cdp_dispatch.h +72 -0
  1382. cuda/cccl/headers/include/thrust/system/cuda/detail/copy.h +129 -0
  1383. cuda/cccl/headers/include/thrust/system/cuda/detail/copy_if.h +255 -0
  1384. cuda/cccl/headers/include/thrust/system/cuda/detail/core/agent_launcher.h +289 -0
  1385. cuda/cccl/headers/include/thrust/system/cuda/detail/core/load_iterator.h +58 -0
  1386. cuda/cccl/headers/include/thrust/system/cuda/detail/core/make_load_iterator.h +60 -0
  1387. cuda/cccl/headers/include/thrust/system/cuda/detail/core/triple_chevron_launch.h +191 -0
  1388. cuda/cccl/headers/include/thrust/system/cuda/detail/core/util.h +630 -0
  1389. cuda/cccl/headers/include/thrust/system/cuda/detail/count.h +75 -0
  1390. cuda/cccl/headers/include/thrust/system/cuda/detail/cross_system.h +243 -0
  1391. cuda/cccl/headers/include/thrust/system/cuda/detail/dispatch.h +210 -0
  1392. cuda/cccl/headers/include/thrust/system/cuda/detail/equal.h +64 -0
  1393. cuda/cccl/headers/include/thrust/system/cuda/detail/error.inl +96 -0
  1394. cuda/cccl/headers/include/thrust/system/cuda/detail/execution_policy.h +113 -0
  1395. cuda/cccl/headers/include/thrust/system/cuda/detail/extrema.h +476 -0
  1396. cuda/cccl/headers/include/thrust/system/cuda/detail/fill.h +82 -0
  1397. cuda/cccl/headers/include/thrust/system/cuda/detail/find.h +272 -0
  1398. cuda/cccl/headers/include/thrust/system/cuda/detail/for_each.h +83 -0
  1399. cuda/cccl/headers/include/thrust/system/cuda/detail/gather.h +91 -0
  1400. cuda/cccl/headers/include/thrust/system/cuda/detail/generate.h +85 -0
  1401. cuda/cccl/headers/include/thrust/system/cuda/detail/get_value.h +65 -0
  1402. cuda/cccl/headers/include/thrust/system/cuda/detail/inner_product.h +75 -0
  1403. cuda/cccl/headers/include/thrust/system/cuda/detail/internal/copy_cross_system.h +204 -0
  1404. cuda/cccl/headers/include/thrust/system/cuda/detail/internal/copy_device_to_device.h +98 -0
  1405. cuda/cccl/headers/include/thrust/system/cuda/detail/iter_swap.h +69 -0
  1406. cuda/cccl/headers/include/thrust/system/cuda/detail/logical.h +29 -0
  1407. cuda/cccl/headers/include/thrust/system/cuda/detail/make_unsigned_special.h +61 -0
  1408. cuda/cccl/headers/include/thrust/system/cuda/detail/malloc_and_free.h +121 -0
  1409. cuda/cccl/headers/include/thrust/system/cuda/detail/memory.inl +57 -0
  1410. cuda/cccl/headers/include/thrust/system/cuda/detail/merge.h +228 -0
  1411. cuda/cccl/headers/include/thrust/system/cuda/detail/mismatch.h +217 -0
  1412. cuda/cccl/headers/include/thrust/system/cuda/detail/par.h +237 -0
  1413. cuda/cccl/headers/include/thrust/system/cuda/detail/par_to_seq.h +95 -0
  1414. cuda/cccl/headers/include/thrust/system/cuda/detail/parallel_for.h +81 -0
  1415. cuda/cccl/headers/include/thrust/system/cuda/detail/partition.h +405 -0
  1416. cuda/cccl/headers/include/thrust/system/cuda/detail/per_device_resource.h +72 -0
  1417. cuda/cccl/headers/include/thrust/system/cuda/detail/reduce.h +961 -0
  1418. cuda/cccl/headers/include/thrust/system/cuda/detail/reduce_by_key.h +1000 -0
  1419. cuda/cccl/headers/include/thrust/system/cuda/detail/remove.h +107 -0
  1420. cuda/cccl/headers/include/thrust/system/cuda/detail/replace.h +164 -0
  1421. cuda/cccl/headers/include/thrust/system/cuda/detail/reverse.h +88 -0
  1422. cuda/cccl/headers/include/thrust/system/cuda/detail/scan.h +342 -0
  1423. cuda/cccl/headers/include/thrust/system/cuda/detail/scan_by_key.h +415 -0
  1424. cuda/cccl/headers/include/thrust/system/cuda/detail/scatter.h +79 -0
  1425. cuda/cccl/headers/include/thrust/system/cuda/detail/sequence.h +29 -0
  1426. cuda/cccl/headers/include/thrust/system/cuda/detail/set_operations.h +1736 -0
  1427. cuda/cccl/headers/include/thrust/system/cuda/detail/sort.h +482 -0
  1428. cuda/cccl/headers/include/thrust/system/cuda/detail/swap_ranges.h +75 -0
  1429. cuda/cccl/headers/include/thrust/system/cuda/detail/tabulate.h +75 -0
  1430. cuda/cccl/headers/include/thrust/system/cuda/detail/temporary_buffer.h +132 -0
  1431. cuda/cccl/headers/include/thrust/system/cuda/detail/terminate.h +53 -0
  1432. cuda/cccl/headers/include/thrust/system/cuda/detail/transform.h +403 -0
  1433. cuda/cccl/headers/include/thrust/system/cuda/detail/transform_reduce.h +143 -0
  1434. cuda/cccl/headers/include/thrust/system/cuda/detail/transform_scan.h +119 -0
  1435. cuda/cccl/headers/include/thrust/system/cuda/detail/uninitialized_copy.h +94 -0
  1436. cuda/cccl/headers/include/thrust/system/cuda/detail/uninitialized_fill.h +91 -0
  1437. cuda/cccl/headers/include/thrust/system/cuda/detail/unique.h +648 -0
  1438. cuda/cccl/headers/include/thrust/system/cuda/detail/unique_by_key.h +311 -0
  1439. cuda/cccl/headers/include/thrust/system/cuda/detail/util.h +251 -0
  1440. cuda/cccl/headers/include/thrust/system/cuda/error.h +175 -0
  1441. cuda/cccl/headers/include/thrust/system/cuda/execution_policy.h +39 -0
  1442. cuda/cccl/headers/include/thrust/system/cuda/memory.h +122 -0
  1443. cuda/cccl/headers/include/thrust/system/cuda/memory_resource.h +122 -0
  1444. cuda/cccl/headers/include/thrust/system/cuda/pointer.h +140 -0
  1445. cuda/cccl/headers/include/thrust/system/cuda/vector.h +108 -0
  1446. cuda/cccl/headers/include/thrust/system/detail/adl/adjacent_difference.h +51 -0
  1447. cuda/cccl/headers/include/thrust/system/detail/adl/assign_value.h +51 -0
  1448. cuda/cccl/headers/include/thrust/system/detail/adl/binary_search.h +51 -0
  1449. cuda/cccl/headers/include/thrust/system/detail/adl/copy.h +51 -0
  1450. cuda/cccl/headers/include/thrust/system/detail/adl/copy_if.h +52 -0
  1451. cuda/cccl/headers/include/thrust/system/detail/adl/count.h +51 -0
  1452. cuda/cccl/headers/include/thrust/system/detail/adl/equal.h +51 -0
  1453. cuda/cccl/headers/include/thrust/system/detail/adl/extrema.h +51 -0
  1454. cuda/cccl/headers/include/thrust/system/detail/adl/fill.h +51 -0
  1455. cuda/cccl/headers/include/thrust/system/detail/adl/find.h +51 -0
  1456. cuda/cccl/headers/include/thrust/system/detail/adl/for_each.h +51 -0
  1457. cuda/cccl/headers/include/thrust/system/detail/adl/gather.h +51 -0
  1458. cuda/cccl/headers/include/thrust/system/detail/adl/generate.h +51 -0
  1459. cuda/cccl/headers/include/thrust/system/detail/adl/get_value.h +51 -0
  1460. cuda/cccl/headers/include/thrust/system/detail/adl/inner_product.h +51 -0
  1461. cuda/cccl/headers/include/thrust/system/detail/adl/iter_swap.h +51 -0
  1462. cuda/cccl/headers/include/thrust/system/detail/adl/logical.h +51 -0
  1463. cuda/cccl/headers/include/thrust/system/detail/adl/malloc_and_free.h +51 -0
  1464. cuda/cccl/headers/include/thrust/system/detail/adl/merge.h +51 -0
  1465. cuda/cccl/headers/include/thrust/system/detail/adl/mismatch.h +51 -0
  1466. cuda/cccl/headers/include/thrust/system/detail/adl/partition.h +51 -0
  1467. cuda/cccl/headers/include/thrust/system/detail/adl/per_device_resource.h +48 -0
  1468. cuda/cccl/headers/include/thrust/system/detail/adl/reduce.h +51 -0
  1469. cuda/cccl/headers/include/thrust/system/detail/adl/reduce_by_key.h +51 -0
  1470. cuda/cccl/headers/include/thrust/system/detail/adl/remove.h +51 -0
  1471. cuda/cccl/headers/include/thrust/system/detail/adl/replace.h +51 -0
  1472. cuda/cccl/headers/include/thrust/system/detail/adl/reverse.h +51 -0
  1473. cuda/cccl/headers/include/thrust/system/detail/adl/scan.h +51 -0
  1474. cuda/cccl/headers/include/thrust/system/detail/adl/scan_by_key.h +51 -0
  1475. cuda/cccl/headers/include/thrust/system/detail/adl/scatter.h +51 -0
  1476. cuda/cccl/headers/include/thrust/system/detail/adl/sequence.h +51 -0
  1477. cuda/cccl/headers/include/thrust/system/detail/adl/set_operations.h +51 -0
  1478. cuda/cccl/headers/include/thrust/system/detail/adl/sort.h +51 -0
  1479. cuda/cccl/headers/include/thrust/system/detail/adl/swap_ranges.h +51 -0
  1480. cuda/cccl/headers/include/thrust/system/detail/adl/tabulate.h +51 -0
  1481. cuda/cccl/headers/include/thrust/system/detail/adl/temporary_buffer.h +51 -0
  1482. cuda/cccl/headers/include/thrust/system/detail/adl/transform.h +51 -0
  1483. cuda/cccl/headers/include/thrust/system/detail/adl/transform_reduce.h +51 -0
  1484. cuda/cccl/headers/include/thrust/system/detail/adl/transform_scan.h +51 -0
  1485. cuda/cccl/headers/include/thrust/system/detail/adl/uninitialized_copy.h +51 -0
  1486. cuda/cccl/headers/include/thrust/system/detail/adl/uninitialized_fill.h +51 -0
  1487. cuda/cccl/headers/include/thrust/system/detail/adl/unique.h +51 -0
  1488. cuda/cccl/headers/include/thrust/system/detail/adl/unique_by_key.h +51 -0
  1489. cuda/cccl/headers/include/thrust/system/detail/bad_alloc.h +64 -0
  1490. cuda/cccl/headers/include/thrust/system/detail/errno.h +125 -0
  1491. cuda/cccl/headers/include/thrust/system/detail/error_category.inl +302 -0
  1492. cuda/cccl/headers/include/thrust/system/detail/error_code.inl +173 -0
  1493. cuda/cccl/headers/include/thrust/system/detail/error_condition.inl +121 -0
  1494. cuda/cccl/headers/include/thrust/system/detail/generic/adjacent_difference.h +59 -0
  1495. cuda/cccl/headers/include/thrust/system/detail/generic/adjacent_difference.inl +85 -0
  1496. cuda/cccl/headers/include/thrust/system/detail/generic/binary_search.h +167 -0
  1497. cuda/cccl/headers/include/thrust/system/detail/generic/binary_search.inl +391 -0
  1498. cuda/cccl/headers/include/thrust/system/detail/generic/copy.h +51 -0
  1499. cuda/cccl/headers/include/thrust/system/detail/generic/copy.inl +70 -0
  1500. cuda/cccl/headers/include/thrust/system/detail/generic/copy_if.h +64 -0
  1501. cuda/cccl/headers/include/thrust/system/detail/generic/copy_if.inl +152 -0
  1502. cuda/cccl/headers/include/thrust/system/detail/generic/count.h +54 -0
  1503. cuda/cccl/headers/include/thrust/system/detail/generic/count.inl +90 -0
  1504. cuda/cccl/headers/include/thrust/system/detail/generic/equal.h +55 -0
  1505. cuda/cccl/headers/include/thrust/system/detail/generic/equal.inl +66 -0
  1506. cuda/cccl/headers/include/thrust/system/detail/generic/extrema.h +72 -0
  1507. cuda/cccl/headers/include/thrust/system/detail/generic/extrema.inl +258 -0
  1508. cuda/cccl/headers/include/thrust/system/detail/generic/fill.h +60 -0
  1509. cuda/cccl/headers/include/thrust/system/detail/generic/find.h +55 -0
  1510. cuda/cccl/headers/include/thrust/system/detail/generic/find.inl +143 -0
  1511. cuda/cccl/headers/include/thrust/system/detail/generic/for_each.h +64 -0
  1512. cuda/cccl/headers/include/thrust/system/detail/generic/gather.h +79 -0
  1513. cuda/cccl/headers/include/thrust/system/detail/generic/gather.inl +102 -0
  1514. cuda/cccl/headers/include/thrust/system/detail/generic/generate.h +51 -0
  1515. cuda/cccl/headers/include/thrust/system/detail/generic/generate.inl +63 -0
  1516. cuda/cccl/headers/include/thrust/system/detail/generic/inner_product.h +66 -0
  1517. cuda/cccl/headers/include/thrust/system/detail/generic/inner_product.inl +78 -0
  1518. cuda/cccl/headers/include/thrust/system/detail/generic/logical.h +65 -0
  1519. cuda/cccl/headers/include/thrust/system/detail/generic/memory.h +70 -0
  1520. cuda/cccl/headers/include/thrust/system/detail/generic/memory.inl +83 -0
  1521. cuda/cccl/headers/include/thrust/system/detail/generic/merge.h +105 -0
  1522. cuda/cccl/headers/include/thrust/system/detail/generic/merge.inl +154 -0
  1523. cuda/cccl/headers/include/thrust/system/detail/generic/mismatch.h +55 -0
  1524. cuda/cccl/headers/include/thrust/system/detail/generic/mismatch.inl +74 -0
  1525. cuda/cccl/headers/include/thrust/system/detail/generic/partition.h +135 -0
  1526. cuda/cccl/headers/include/thrust/system/detail/generic/partition.inl +213 -0
  1527. cuda/cccl/headers/include/thrust/system/detail/generic/per_device_resource.h +49 -0
  1528. cuda/cccl/headers/include/thrust/system/detail/generic/reduce.h +77 -0
  1529. cuda/cccl/headers/include/thrust/system/detail/generic/reduce.inl +106 -0
  1530. cuda/cccl/headers/include/thrust/system/detail/generic/reduce_by_key.h +89 -0
  1531. cuda/cccl/headers/include/thrust/system/detail/generic/reduce_by_key.inl +192 -0
  1532. cuda/cccl/headers/include/thrust/system/detail/generic/remove.h +92 -0
  1533. cuda/cccl/headers/include/thrust/system/detail/generic/remove.inl +127 -0
  1534. cuda/cccl/headers/include/thrust/system/detail/generic/replace.h +101 -0
  1535. cuda/cccl/headers/include/thrust/system/detail/generic/replace.inl +181 -0
  1536. cuda/cccl/headers/include/thrust/system/detail/generic/reverse.h +54 -0
  1537. cuda/cccl/headers/include/thrust/system/detail/generic/reverse.inl +72 -0
  1538. cuda/cccl/headers/include/thrust/system/detail/generic/scalar/binary_search.h +78 -0
  1539. cuda/cccl/headers/include/thrust/system/detail/generic/scalar/binary_search.inl +141 -0
  1540. cuda/cccl/headers/include/thrust/system/detail/generic/scan.h +78 -0
  1541. cuda/cccl/headers/include/thrust/system/detail/generic/scan.inl +91 -0
  1542. cuda/cccl/headers/include/thrust/system/detail/generic/scan_by_key.h +132 -0
  1543. cuda/cccl/headers/include/thrust/system/detail/generic/scan_by_key.inl +238 -0
  1544. cuda/cccl/headers/include/thrust/system/detail/generic/scatter.h +79 -0
  1545. cuda/cccl/headers/include/thrust/system/detail/generic/scatter.inl +91 -0
  1546. cuda/cccl/headers/include/thrust/system/detail/generic/select_system.h +96 -0
  1547. cuda/cccl/headers/include/thrust/system/detail/generic/sequence.h +55 -0
  1548. cuda/cccl/headers/include/thrust/system/detail/generic/sequence.inl +95 -0
  1549. cuda/cccl/headers/include/thrust/system/detail/generic/set_operations.h +288 -0
  1550. cuda/cccl/headers/include/thrust/system/detail/generic/set_operations.inl +482 -0
  1551. cuda/cccl/headers/include/thrust/system/detail/generic/shuffle.h +60 -0
  1552. cuda/cccl/headers/include/thrust/system/detail/generic/shuffle.inl +131 -0
  1553. cuda/cccl/headers/include/thrust/system/detail/generic/sort.h +119 -0
  1554. cuda/cccl/headers/include/thrust/system/detail/generic/sort.inl +181 -0
  1555. cuda/cccl/headers/include/thrust/system/detail/generic/swap_ranges.h +50 -0
  1556. cuda/cccl/headers/include/thrust/system/detail/generic/swap_ranges.inl +82 -0
  1557. cuda/cccl/headers/include/thrust/system/detail/generic/tabulate.h +47 -0
  1558. cuda/cccl/headers/include/thrust/system/detail/generic/tabulate.inl +60 -0
  1559. cuda/cccl/headers/include/thrust/system/detail/generic/tag.h +53 -0
  1560. cuda/cccl/headers/include/thrust/system/detail/generic/temporary_buffer.h +60 -0
  1561. cuda/cccl/headers/include/thrust/system/detail/generic/temporary_buffer.inl +88 -0
  1562. cuda/cccl/headers/include/thrust/system/detail/generic/transform.h +109 -0
  1563. cuda/cccl/headers/include/thrust/system/detail/generic/transform.inl +185 -0
  1564. cuda/cccl/headers/include/thrust/system/detail/generic/transform_reduce.h +56 -0
  1565. cuda/cccl/headers/include/thrust/system/detail/generic/transform_reduce.inl +62 -0
  1566. cuda/cccl/headers/include/thrust/system/detail/generic/transform_scan.h +86 -0
  1567. cuda/cccl/headers/include/thrust/system/detail/generic/transform_scan.inl +119 -0
  1568. cuda/cccl/headers/include/thrust/system/detail/generic/uninitialized_copy.h +51 -0
  1569. cuda/cccl/headers/include/thrust/system/detail/generic/uninitialized_copy.inl +172 -0
  1570. cuda/cccl/headers/include/thrust/system/detail/generic/uninitialized_fill.h +51 -0
  1571. cuda/cccl/headers/include/thrust/system/detail/generic/uninitialized_fill.inl +121 -0
  1572. cuda/cccl/headers/include/thrust/system/detail/generic/unique.h +77 -0
  1573. cuda/cccl/headers/include/thrust/system/detail/generic/unique.inl +119 -0
  1574. cuda/cccl/headers/include/thrust/system/detail/generic/unique_by_key.h +87 -0
  1575. cuda/cccl/headers/include/thrust/system/detail/generic/unique_by_key.inl +132 -0
  1576. cuda/cccl/headers/include/thrust/system/detail/internal/decompose.h +123 -0
  1577. cuda/cccl/headers/include/thrust/system/detail/sequential/adjacent_difference.h +76 -0
  1578. cuda/cccl/headers/include/thrust/system/detail/sequential/assign_value.h +48 -0
  1579. cuda/cccl/headers/include/thrust/system/detail/sequential/binary_search.h +142 -0
  1580. cuda/cccl/headers/include/thrust/system/detail/sequential/copy.h +55 -0
  1581. cuda/cccl/headers/include/thrust/system/detail/sequential/copy.inl +125 -0
  1582. cuda/cccl/headers/include/thrust/system/detail/sequential/copy_backward.h +55 -0
  1583. cuda/cccl/headers/include/thrust/system/detail/sequential/copy_if.h +77 -0
  1584. cuda/cccl/headers/include/thrust/system/detail/sequential/count.h +29 -0
  1585. cuda/cccl/headers/include/thrust/system/detail/sequential/equal.h +29 -0
  1586. cuda/cccl/headers/include/thrust/system/detail/sequential/execution_policy.h +78 -0
  1587. cuda/cccl/headers/include/thrust/system/detail/sequential/extrema.h +116 -0
  1588. cuda/cccl/headers/include/thrust/system/detail/sequential/fill.h +29 -0
  1589. cuda/cccl/headers/include/thrust/system/detail/sequential/find.h +68 -0
  1590. cuda/cccl/headers/include/thrust/system/detail/sequential/for_each.h +80 -0
  1591. cuda/cccl/headers/include/thrust/system/detail/sequential/gather.h +29 -0
  1592. cuda/cccl/headers/include/thrust/system/detail/sequential/general_copy.h +129 -0
  1593. cuda/cccl/headers/include/thrust/system/detail/sequential/generate.h +29 -0
  1594. cuda/cccl/headers/include/thrust/system/detail/sequential/get_value.h +49 -0
  1595. cuda/cccl/headers/include/thrust/system/detail/sequential/inner_product.h +29 -0
  1596. cuda/cccl/headers/include/thrust/system/detail/sequential/insertion_sort.h +147 -0
  1597. cuda/cccl/headers/include/thrust/system/detail/sequential/iter_swap.h +51 -0
  1598. cuda/cccl/headers/include/thrust/system/detail/sequential/logical.h +29 -0
  1599. cuda/cccl/headers/include/thrust/system/detail/sequential/malloc_and_free.h +56 -0
  1600. cuda/cccl/headers/include/thrust/system/detail/sequential/merge.h +81 -0
  1601. cuda/cccl/headers/include/thrust/system/detail/sequential/merge.inl +151 -0
  1602. cuda/cccl/headers/include/thrust/system/detail/sequential/mismatch.h +29 -0
  1603. cuda/cccl/headers/include/thrust/system/detail/sequential/partition.h +309 -0
  1604. cuda/cccl/headers/include/thrust/system/detail/sequential/per_device_resource.h +29 -0
  1605. cuda/cccl/headers/include/thrust/system/detail/sequential/reduce.h +70 -0
  1606. cuda/cccl/headers/include/thrust/system/detail/sequential/reduce_by_key.h +104 -0
  1607. cuda/cccl/headers/include/thrust/system/detail/sequential/remove.h +185 -0
  1608. cuda/cccl/headers/include/thrust/system/detail/sequential/replace.h +29 -0
  1609. cuda/cccl/headers/include/thrust/system/detail/sequential/reverse.h +29 -0
  1610. cuda/cccl/headers/include/thrust/system/detail/sequential/scan.h +160 -0
  1611. cuda/cccl/headers/include/thrust/system/detail/sequential/scan_by_key.h +151 -0
  1612. cuda/cccl/headers/include/thrust/system/detail/sequential/scatter.h +29 -0
  1613. cuda/cccl/headers/include/thrust/system/detail/sequential/sequence.h +29 -0
  1614. cuda/cccl/headers/include/thrust/system/detail/sequential/set_operations.h +212 -0
  1615. cuda/cccl/headers/include/thrust/system/detail/sequential/sort.h +65 -0
  1616. cuda/cccl/headers/include/thrust/system/detail/sequential/sort.inl +187 -0
  1617. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_merge_sort.h +61 -0
  1618. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_merge_sort.inl +362 -0
  1619. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_primitive_sort.h +54 -0
  1620. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_primitive_sort.inl +130 -0
  1621. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_radix_sort.h +54 -0
  1622. cuda/cccl/headers/include/thrust/system/detail/sequential/stable_radix_sort.inl +592 -0
  1623. cuda/cccl/headers/include/thrust/system/detail/sequential/swap_ranges.h +29 -0
  1624. cuda/cccl/headers/include/thrust/system/detail/sequential/tabulate.h +29 -0
  1625. cuda/cccl/headers/include/thrust/system/detail/sequential/temporary_buffer.h +29 -0
  1626. cuda/cccl/headers/include/thrust/system/detail/sequential/transform.h +29 -0
  1627. cuda/cccl/headers/include/thrust/system/detail/sequential/transform_reduce.h +29 -0
  1628. cuda/cccl/headers/include/thrust/system/detail/sequential/transform_scan.h +29 -0
  1629. cuda/cccl/headers/include/thrust/system/detail/sequential/trivial_copy.h +64 -0
  1630. cuda/cccl/headers/include/thrust/system/detail/sequential/uninitialized_copy.h +29 -0
  1631. cuda/cccl/headers/include/thrust/system/detail/sequential/uninitialized_fill.h +29 -0
  1632. cuda/cccl/headers/include/thrust/system/detail/sequential/unique.h +121 -0
  1633. cuda/cccl/headers/include/thrust/system/detail/sequential/unique_by_key.h +112 -0
  1634. cuda/cccl/headers/include/thrust/system/detail/system_error.inl +108 -0
  1635. cuda/cccl/headers/include/thrust/system/error_code.h +512 -0
  1636. cuda/cccl/headers/include/thrust/system/omp/detail/adjacent_difference.h +54 -0
  1637. cuda/cccl/headers/include/thrust/system/omp/detail/assign_value.h +30 -0
  1638. cuda/cccl/headers/include/thrust/system/omp/detail/binary_search.h +77 -0
  1639. cuda/cccl/headers/include/thrust/system/omp/detail/copy.h +50 -0
  1640. cuda/cccl/headers/include/thrust/system/omp/detail/copy.inl +74 -0
  1641. cuda/cccl/headers/include/thrust/system/omp/detail/copy_if.h +56 -0
  1642. cuda/cccl/headers/include/thrust/system/omp/detail/copy_if.inl +59 -0
  1643. cuda/cccl/headers/include/thrust/system/omp/detail/count.h +30 -0
  1644. cuda/cccl/headers/include/thrust/system/omp/detail/default_decomposition.h +50 -0
  1645. cuda/cccl/headers/include/thrust/system/omp/detail/default_decomposition.inl +65 -0
  1646. cuda/cccl/headers/include/thrust/system/omp/detail/equal.h +30 -0
  1647. cuda/cccl/headers/include/thrust/system/omp/detail/execution_policy.h +113 -0
  1648. cuda/cccl/headers/include/thrust/system/omp/detail/extrema.h +66 -0
  1649. cuda/cccl/headers/include/thrust/system/omp/detail/fill.h +30 -0
  1650. cuda/cccl/headers/include/thrust/system/omp/detail/find.h +53 -0
  1651. cuda/cccl/headers/include/thrust/system/omp/detail/for_each.h +56 -0
  1652. cuda/cccl/headers/include/thrust/system/omp/detail/for_each.inl +87 -0
  1653. cuda/cccl/headers/include/thrust/system/omp/detail/gather.h +30 -0
  1654. cuda/cccl/headers/include/thrust/system/omp/detail/generate.h +30 -0
  1655. cuda/cccl/headers/include/thrust/system/omp/detail/get_value.h +30 -0
  1656. cuda/cccl/headers/include/thrust/system/omp/detail/inner_product.h +30 -0
  1657. cuda/cccl/headers/include/thrust/system/omp/detail/iter_swap.h +30 -0
  1658. cuda/cccl/headers/include/thrust/system/omp/detail/logical.h +30 -0
  1659. cuda/cccl/headers/include/thrust/system/omp/detail/malloc_and_free.h +30 -0
  1660. cuda/cccl/headers/include/thrust/system/omp/detail/memory.inl +93 -0
  1661. cuda/cccl/headers/include/thrust/system/omp/detail/merge.h +30 -0
  1662. cuda/cccl/headers/include/thrust/system/omp/detail/mismatch.h +30 -0
  1663. cuda/cccl/headers/include/thrust/system/omp/detail/par.h +62 -0
  1664. cuda/cccl/headers/include/thrust/system/omp/detail/partition.h +88 -0
  1665. cuda/cccl/headers/include/thrust/system/omp/detail/partition.inl +102 -0
  1666. cuda/cccl/headers/include/thrust/system/omp/detail/per_device_resource.h +29 -0
  1667. cuda/cccl/headers/include/thrust/system/omp/detail/pragma_omp.h +54 -0
  1668. cuda/cccl/headers/include/thrust/system/omp/detail/reduce.h +54 -0
  1669. cuda/cccl/headers/include/thrust/system/omp/detail/reduce.inl +78 -0
  1670. cuda/cccl/headers/include/thrust/system/omp/detail/reduce_by_key.h +64 -0
  1671. cuda/cccl/headers/include/thrust/system/omp/detail/reduce_by_key.inl +65 -0
  1672. cuda/cccl/headers/include/thrust/system/omp/detail/reduce_intervals.h +59 -0
  1673. cuda/cccl/headers/include/thrust/system/omp/detail/reduce_intervals.inl +103 -0
  1674. cuda/cccl/headers/include/thrust/system/omp/detail/remove.h +72 -0
  1675. cuda/cccl/headers/include/thrust/system/omp/detail/remove.inl +87 -0
  1676. cuda/cccl/headers/include/thrust/system/omp/detail/replace.h +30 -0
  1677. cuda/cccl/headers/include/thrust/system/omp/detail/reverse.h +30 -0
  1678. cuda/cccl/headers/include/thrust/system/omp/detail/scan.h +30 -0
  1679. cuda/cccl/headers/include/thrust/system/omp/detail/scan_by_key.h +30 -0
  1680. cuda/cccl/headers/include/thrust/system/omp/detail/scatter.h +30 -0
  1681. cuda/cccl/headers/include/thrust/system/omp/detail/sequence.h +30 -0
  1682. cuda/cccl/headers/include/thrust/system/omp/detail/set_operations.h +30 -0
  1683. cuda/cccl/headers/include/thrust/system/omp/detail/sort.h +60 -0
  1684. cuda/cccl/headers/include/thrust/system/omp/detail/sort.inl +259 -0
  1685. cuda/cccl/headers/include/thrust/system/omp/detail/swap_ranges.h +30 -0
  1686. cuda/cccl/headers/include/thrust/system/omp/detail/tabulate.h +30 -0
  1687. cuda/cccl/headers/include/thrust/system/omp/detail/temporary_buffer.h +29 -0
  1688. cuda/cccl/headers/include/thrust/system/omp/detail/transform.h +30 -0
  1689. cuda/cccl/headers/include/thrust/system/omp/detail/transform_reduce.h +30 -0
  1690. cuda/cccl/headers/include/thrust/system/omp/detail/transform_scan.h +30 -0
  1691. cuda/cccl/headers/include/thrust/system/omp/detail/uninitialized_copy.h +30 -0
  1692. cuda/cccl/headers/include/thrust/system/omp/detail/uninitialized_fill.h +30 -0
  1693. cuda/cccl/headers/include/thrust/system/omp/detail/unique.h +60 -0
  1694. cuda/cccl/headers/include/thrust/system/omp/detail/unique.inl +71 -0
  1695. cuda/cccl/headers/include/thrust/system/omp/detail/unique_by_key.h +67 -0
  1696. cuda/cccl/headers/include/thrust/system/omp/detail/unique_by_key.inl +75 -0
  1697. cuda/cccl/headers/include/thrust/system/omp/execution_policy.h +160 -0
  1698. cuda/cccl/headers/include/thrust/system/omp/memory.h +111 -0
  1699. cuda/cccl/headers/include/thrust/system/omp/memory_resource.h +75 -0
  1700. cuda/cccl/headers/include/thrust/system/omp/pointer.h +120 -0
  1701. cuda/cccl/headers/include/thrust/system/omp/vector.h +99 -0
  1702. cuda/cccl/headers/include/thrust/system/system_error.h +184 -0
  1703. cuda/cccl/headers/include/thrust/system/tbb/detail/adjacent_difference.h +54 -0
  1704. cuda/cccl/headers/include/thrust/system/tbb/detail/assign_value.h +30 -0
  1705. cuda/cccl/headers/include/thrust/system/tbb/detail/binary_search.h +30 -0
  1706. cuda/cccl/headers/include/thrust/system/tbb/detail/copy.h +50 -0
  1707. cuda/cccl/headers/include/thrust/system/tbb/detail/copy.inl +73 -0
  1708. cuda/cccl/headers/include/thrust/system/tbb/detail/copy_if.h +47 -0
  1709. cuda/cccl/headers/include/thrust/system/tbb/detail/copy_if.inl +136 -0
  1710. cuda/cccl/headers/include/thrust/system/tbb/detail/count.h +30 -0
  1711. cuda/cccl/headers/include/thrust/system/tbb/detail/equal.h +30 -0
  1712. cuda/cccl/headers/include/thrust/system/tbb/detail/execution_policy.h +92 -0
  1713. cuda/cccl/headers/include/thrust/system/tbb/detail/extrema.h +66 -0
  1714. cuda/cccl/headers/include/thrust/system/tbb/detail/fill.h +30 -0
  1715. cuda/cccl/headers/include/thrust/system/tbb/detail/find.h +49 -0
  1716. cuda/cccl/headers/include/thrust/system/tbb/detail/for_each.h +51 -0
  1717. cuda/cccl/headers/include/thrust/system/tbb/detail/for_each.inl +91 -0
  1718. cuda/cccl/headers/include/thrust/system/tbb/detail/gather.h +30 -0
  1719. cuda/cccl/headers/include/thrust/system/tbb/detail/generate.h +30 -0
  1720. cuda/cccl/headers/include/thrust/system/tbb/detail/get_value.h +30 -0
  1721. cuda/cccl/headers/include/thrust/system/tbb/detail/inner_product.h +30 -0
  1722. cuda/cccl/headers/include/thrust/system/tbb/detail/iter_swap.h +30 -0
  1723. cuda/cccl/headers/include/thrust/system/tbb/detail/logical.h +30 -0
  1724. cuda/cccl/headers/include/thrust/system/tbb/detail/malloc_and_free.h +30 -0
  1725. cuda/cccl/headers/include/thrust/system/tbb/detail/memory.inl +94 -0
  1726. cuda/cccl/headers/include/thrust/system/tbb/detail/merge.h +77 -0
  1727. cuda/cccl/headers/include/thrust/system/tbb/detail/merge.inl +327 -0
  1728. cuda/cccl/headers/include/thrust/system/tbb/detail/mismatch.h +30 -0
  1729. cuda/cccl/headers/include/thrust/system/tbb/detail/par.h +62 -0
  1730. cuda/cccl/headers/include/thrust/system/tbb/detail/partition.h +84 -0
  1731. cuda/cccl/headers/include/thrust/system/tbb/detail/partition.inl +98 -0
  1732. cuda/cccl/headers/include/thrust/system/tbb/detail/per_device_resource.h +29 -0
  1733. cuda/cccl/headers/include/thrust/system/tbb/detail/reduce.h +54 -0
  1734. cuda/cccl/headers/include/thrust/system/tbb/detail/reduce.inl +137 -0
  1735. cuda/cccl/headers/include/thrust/system/tbb/detail/reduce_by_key.h +61 -0
  1736. cuda/cccl/headers/include/thrust/system/tbb/detail/reduce_by_key.inl +400 -0
  1737. cuda/cccl/headers/include/thrust/system/tbb/detail/reduce_intervals.h +140 -0
  1738. cuda/cccl/headers/include/thrust/system/tbb/detail/remove.h +76 -0
  1739. cuda/cccl/headers/include/thrust/system/tbb/detail/remove.inl +87 -0
  1740. cuda/cccl/headers/include/thrust/system/tbb/detail/replace.h +30 -0
  1741. cuda/cccl/headers/include/thrust/system/tbb/detail/reverse.h +30 -0
  1742. cuda/cccl/headers/include/thrust/system/tbb/detail/scan.h +59 -0
  1743. cuda/cccl/headers/include/thrust/system/tbb/detail/scan.inl +312 -0
  1744. cuda/cccl/headers/include/thrust/system/tbb/detail/scan_by_key.h +30 -0
  1745. cuda/cccl/headers/include/thrust/system/tbb/detail/scatter.h +30 -0
  1746. cuda/cccl/headers/include/thrust/system/tbb/detail/sequence.h +30 -0
  1747. cuda/cccl/headers/include/thrust/system/tbb/detail/set_operations.h +30 -0
  1748. cuda/cccl/headers/include/thrust/system/tbb/detail/sort.h +60 -0
  1749. cuda/cccl/headers/include/thrust/system/tbb/detail/sort.inl +295 -0
  1750. cuda/cccl/headers/include/thrust/system/tbb/detail/swap_ranges.h +30 -0
  1751. cuda/cccl/headers/include/thrust/system/tbb/detail/tabulate.h +30 -0
  1752. cuda/cccl/headers/include/thrust/system/tbb/detail/temporary_buffer.h +29 -0
  1753. cuda/cccl/headers/include/thrust/system/tbb/detail/transform.h +30 -0
  1754. cuda/cccl/headers/include/thrust/system/tbb/detail/transform_reduce.h +30 -0
  1755. cuda/cccl/headers/include/thrust/system/tbb/detail/transform_scan.h +30 -0
  1756. cuda/cccl/headers/include/thrust/system/tbb/detail/uninitialized_copy.h +30 -0
  1757. cuda/cccl/headers/include/thrust/system/tbb/detail/uninitialized_fill.h +30 -0
  1758. cuda/cccl/headers/include/thrust/system/tbb/detail/unique.h +60 -0
  1759. cuda/cccl/headers/include/thrust/system/tbb/detail/unique.inl +71 -0
  1760. cuda/cccl/headers/include/thrust/system/tbb/detail/unique_by_key.h +67 -0
  1761. cuda/cccl/headers/include/thrust/system/tbb/detail/unique_by_key.inl +75 -0
  1762. cuda/cccl/headers/include/thrust/system/tbb/execution_policy.h +160 -0
  1763. cuda/cccl/headers/include/thrust/system/tbb/memory.h +111 -0
  1764. cuda/cccl/headers/include/thrust/system/tbb/memory_resource.h +75 -0
  1765. cuda/cccl/headers/include/thrust/system/tbb/pointer.h +120 -0
  1766. cuda/cccl/headers/include/thrust/system/tbb/vector.h +99 -0
  1767. cuda/cccl/headers/include/thrust/system_error.h +57 -0
  1768. cuda/cccl/headers/include/thrust/tabulate.h +125 -0
  1769. cuda/cccl/headers/include/thrust/transform.h +903 -0
  1770. cuda/cccl/headers/include/thrust/transform_reduce.h +190 -0
  1771. cuda/cccl/headers/include/thrust/transform_scan.h +442 -0
  1772. cuda/cccl/headers/include/thrust/tuple.h +142 -0
  1773. cuda/cccl/headers/include/thrust/type_traits/integer_sequence.h +261 -0
  1774. cuda/cccl/headers/include/thrust/type_traits/is_contiguous_iterator.h +182 -0
  1775. cuda/cccl/headers/include/thrust/type_traits/is_execution_policy.h +65 -0
  1776. cuda/cccl/headers/include/thrust/type_traits/is_operator_less_or_greater_function_object.h +184 -0
  1777. cuda/cccl/headers/include/thrust/type_traits/is_operator_plus_function_object.h +116 -0
  1778. cuda/cccl/headers/include/thrust/type_traits/is_trivially_relocatable.h +306 -0
  1779. cuda/cccl/headers/include/thrust/type_traits/logical_metafunctions.h +42 -0
  1780. cuda/cccl/headers/include/thrust/type_traits/unwrap_contiguous_iterator.h +93 -0
  1781. cuda/cccl/headers/include/thrust/uninitialized_copy.h +300 -0
  1782. cuda/cccl/headers/include/thrust/uninitialized_fill.h +268 -0
  1783. cuda/cccl/headers/include/thrust/unique.h +1090 -0
  1784. cuda/cccl/headers/include/thrust/universal_allocator.h +90 -0
  1785. cuda/cccl/headers/include/thrust/universal_ptr.h +34 -0
  1786. cuda/cccl/headers/include/thrust/universal_vector.h +71 -0
  1787. cuda/cccl/headers/include/thrust/version.h +93 -0
  1788. cuda/cccl/headers/include/thrust/zip_function.h +176 -0
  1789. cuda/cccl/headers/include_paths.py +72 -0
  1790. cuda/cccl/parallel/__init__.py +3 -0
  1791. cuda/cccl/parallel/experimental/__init__.py +3 -0
  1792. cuda/cccl/parallel/experimental/_bindings.py +24 -0
  1793. cuda/cccl/parallel/experimental/_bindings.pyi +388 -0
  1794. cuda/cccl/parallel/experimental/_bindings_impl.cpython-310-x86_64-linux-gnu.so +0 -0
  1795. cuda/cccl/parallel/experimental/_bindings_impl.pyx +2158 -0
  1796. cuda/cccl/parallel/experimental/_caching.py +71 -0
  1797. cuda/cccl/parallel/experimental/_cccl_interop.py +371 -0
  1798. cuda/cccl/parallel/experimental/_utils/__init__.py +0 -0
  1799. cuda/cccl/parallel/experimental/_utils/protocols.py +132 -0
  1800. cuda/cccl/parallel/experimental/algorithms/__init__.py +28 -0
  1801. cuda/cccl/parallel/experimental/algorithms/_merge_sort.py +172 -0
  1802. cuda/cccl/parallel/experimental/algorithms/_radix_sort.py +244 -0
  1803. cuda/cccl/parallel/experimental/algorithms/_reduce.py +136 -0
  1804. cuda/cccl/parallel/experimental/algorithms/_scan.py +179 -0
  1805. cuda/cccl/parallel/experimental/algorithms/_segmented_reduce.py +183 -0
  1806. cuda/cccl/parallel/experimental/algorithms/_transform.py +213 -0
  1807. cuda/cccl/parallel/experimental/algorithms/_unique_by_key.py +179 -0
  1808. cuda/cccl/parallel/experimental/cccl/.gitkeep +0 -0
  1809. cuda/cccl/parallel/experimental/cccl/libcccl.c.parallel.so +0 -0
  1810. cuda/cccl/parallel/experimental/iterators/__init__.py +157 -0
  1811. cuda/cccl/parallel/experimental/iterators/_iterators.py +650 -0
  1812. cuda/cccl/parallel/experimental/numba_utils.py +6 -0
  1813. cuda/cccl/parallel/experimental/struct.py +150 -0
  1814. cuda/cccl/parallel/experimental/typing.py +27 -0
  1815. cuda/cccl/py.typed +0 -0
  1816. cuda_cccl-0.1.3.1.0.dev1486.dist-info/METADATA +29 -0
  1817. cuda_cccl-0.1.3.1.0.dev1486.dist-info/RECORD +1819 -0
  1818. cuda_cccl-0.1.3.1.0.dev1486.dist-info/WHEEL +6 -0
  1819. cuda_cccl-0.1.3.1.0.dev1486.dist-info/licenses/LICENSE +1 -0
@@ -0,0 +1,2982 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * Licensed under the Apache License v2.0 with LLVM Exceptions.
18
+ * See https://nvidia.github.io/NVTX/LICENSE.txt for license information.
19
+ */
20
+
21
+ /* Temporary helper #defines, #undef'ed at end of header */
22
+ #define NVTX3_CPP_VERSION_MAJOR 1
23
+ #define NVTX3_CPP_VERSION_MINOR 0
24
+
25
+ /* This section handles the decision of whether to provide unversioned symbols.
26
+ * If NVTX3_CPP_REQUIRE_EXPLICIT_VERSION is #defined, unversioned symbols are
27
+ * not provided, and explicit-version symbols such as nvtx3::v1::scoped_range
28
+ * and NVTX3_V1_FUNC_RANGE must be used. By default, the first #include of this
29
+ * header will define the unversioned symbols such as nvtx3::scoped_range and
30
+ * NVTX3_FUNC_RANGE. Subsequently including a different major version of this
31
+ * header without #defining NVTX3_CPP_REQUIRE_EXPLICIT_VERSION triggers an error
32
+ * since the symbols would conflict. Subsequently including of a different
33
+ * minor version within the same major version is allowed. Functionality of
34
+ * minor versions is cumulative, regardless of include order.
35
+ *
36
+ * Since NVTX3_CPP_REQUIRE_EXPLICIT_VERSION allows all combinations of versions
37
+ * to coexist without problems within a translation unit, the recommended best
38
+ * practice for instrumenting header-based libraries with NVTX C++ Wrappers is
39
+ * is to #define NVTX3_CPP_REQUIRE_EXPLICIT_VERSION before including nvtx3.hpp,
40
+ * #undef it afterward, and only use explicit-version symbols. This is not
41
+ * necessary in common cases, such as instrumenting a standalone application, or
42
+ * static/shared libraries in .cpp files or headers private to those projects.
43
+ */
44
+ /* clang-format off */
45
+ #if !defined(NVTX3_CPP_REQUIRE_EXPLICIT_VERSION)
46
+ /* Define macro used by all definitions in this header to indicate the
47
+ * unversioned symbols should be defined in addition to the versioned ones.
48
+ */
49
+ #define NVTX3_INLINE_THIS_VERSION
50
+
51
+ #if !defined(NVTX3_CPP_INLINED_VERSION_MAJOR)
52
+ /* First occurrence of this header in the translation unit. Define macros
53
+ * indicating which version shall be used for unversioned symbols.
54
+ */
55
+
56
+ /**
57
+ * @brief Semantic major version number for NVTX C++ wrappers of unversioned symbols
58
+ *
59
+ * Breaking changes may occur between major versions, and different major versions
60
+ * cannot provide unversioned symbols in the same translation unit (.cpp file).
61
+ *
62
+ * Note: If NVTX3_CPP_REQUIRE_EXPLICIT_VERSION is defined, this macro is not defined.
63
+ *
64
+ * Not to be confused with the version number of the NVTX core library.
65
+ */
66
+ #define NVTX3_CPP_INLINED_VERSION_MAJOR 1 // NVTX3_CPP_VERSION_MAJOR
67
+
68
+ /**
69
+ * @brief Semantic minor version number for NVTX C++ wrappers of unversioned symbols
70
+ *
71
+ * No breaking changes occur between minor versions -- minor version changes within
72
+ * a major version are purely additive.
73
+ *
74
+ * Note: If NVTX3_CPP_REQUIRE_EXPLICIT_VERSION is defined, this macro is not defined.
75
+ *
76
+ * Not to be confused with the version number of the NVTX core library.
77
+ */
78
+ #define NVTX3_CPP_INLINED_VERSION_MINOR 0 // NVTX3_CPP_VERSION_MINOR
79
+ #elif NVTX3_CPP_INLINED_VERSION_MAJOR != NVTX3_CPP_VERSION_MAJOR
80
+ /* Unsupported case -- cannot define unversioned symbols for different major versions
81
+ * in the same translation unit.
82
+ */
83
+ #error \
84
+ "Two different major versions of the NVTX C++ Wrappers are being included in a single .cpp file, with unversioned symbols enabled in both. Only one major version can enable unversioned symbols in a .cpp file. To disable unversioned symbols, #define NVTX3_CPP_REQUIRE_EXPLICIT_VERSION before #including nvtx3.hpp, and use the explicit-version symbols instead -- this is the preferred way to use nvtx3.hpp from a header file."
85
+ #elif (NVTX3_CPP_INLINED_VERSION_MAJOR == NVTX3_CPP_VERSION_MAJOR) && \
86
+ (NVTX3_CPP_INLINED_VERSION_MINOR < NVTX3_CPP_VERSION_MINOR)
87
+ /* An older minor version of the same major version already defined unversioned
88
+ * symbols. The new features provided in this header will be inlined
89
+ * redefine the minor version macro to this header's version.
90
+ */
91
+ #undef NVTX3_CPP_INLINED_VERSION_MINOR
92
+ #define NVTX3_CPP_INLINED_VERSION_MINOR 0 // NVTX3_CPP_VERSION_MINOR
93
+ // else, already have this version or newer, nothing to do
94
+ #endif
95
+ #endif
96
+ /* clang-format on */
97
+
98
+ /**
99
+ * @file nvtx3.hpp
100
+ *
101
+ * @brief Provides C++ constructs making the NVTX library safer and easier to
102
+ * use with zero overhead.
103
+ */
104
+
105
+ /**
106
+ * \mainpage
107
+ * \tableofcontents
108
+ *
109
+ * \section QUICK_START Quick Start
110
+ *
111
+ * To add NVTX ranges to your code, use the `nvtx3::scoped_range` RAII object. A
112
+ * range begins when the object is created, and ends when the object is
113
+ * destroyed.
114
+ *
115
+ * \code{.cpp}
116
+ * #include "nvtx3.hpp"
117
+ * void some_function() {
118
+ * // Begins a NVTX range with the message "some_function"
119
+ * // The range ends when some_function() returns and `r` is destroyed
120
+ * nvtx3::scoped_range r{"some_function"};
121
+ *
122
+ * for(int i = 0; i < 6; ++i) {
123
+ * nvtx3::scoped_range loop{"loop range"};
124
+ * std::this_thread::sleep_for(std::chrono::seconds{1});
125
+ * }
126
+ * } // Range ends when `r` is destroyed
127
+ * \endcode
128
+ *
129
+ * The example code above generates the following timeline view in Nsight
130
+ * Systems:
131
+ *
132
+ * \image html
133
+ * https://raw.githubusercontent.com/NVIDIA/NVTX/release-v3/docs/images/example_range.png
134
+ *
135
+ * Alternatively, use the \ref MACROS like `NVTX3_FUNC_RANGE()` to add
136
+ * ranges to your code that automatically use the name of the enclosing function
137
+ * as the range's message.
138
+ *
139
+ * \code{.cpp}
140
+ * #include "nvtx3.hpp"
141
+ * void some_function() {
142
+ * // Creates a range with a message "some_function" that ends when the
143
+ * // enclosing function returns
144
+ * NVTX3_FUNC_RANGE();
145
+ * ...
146
+ * }
147
+ * \endcode
148
+ *
149
+ *
150
+ * \section Overview
151
+ *
152
+ * The NVTX library provides a set of functions for users to annotate their code
153
+ * to aid in performance profiling and optimization. These annotations provide
154
+ * information to tools like Nsight Systems to improve visualization of
155
+ * application timelines.
156
+ *
157
+ * \ref RANGES are one of the most commonly used NVTX constructs for annotating
158
+ * a span of time. For example, imagine a user wanted to see every time a
159
+ * function, `my_function`, is called and how long it takes to execute. This can
160
+ * be accomplished with an NVTX range created on the entry to the function and
161
+ * terminated on return from `my_function` using the push/pop C APIs:
162
+ *
163
+ * \code{.cpp}
164
+ * void my_function(...) {
165
+ * nvtxRangePushA("my_function"); // Begins NVTX range
166
+ * // do work
167
+ * nvtxRangePop(); // Ends NVTX range
168
+ * }
169
+ * \endcode
170
+ *
171
+ * One of the challenges with using the NVTX C API is that it requires manually
172
+ * terminating the end of the range with `nvtxRangePop`. This can be challenging
173
+ * if `my_function()` has multiple returns or can throw exceptions as it
174
+ * requires calling `nvtxRangePop()` before all possible return points.
175
+ *
176
+ * NVTX C++ solves this inconvenience through the "RAII" technique by providing
177
+ * a `nvtx3::scoped_range` class that begins a range at construction and ends
178
+ * the range on destruction. The above example then becomes:
179
+ *
180
+ * \code{.cpp}
181
+ * void my_function(...) {
182
+ * nvtx3::scoped_range r{"my_function"}; // Begins NVTX range
183
+ * // do work
184
+ * } // Range ends on exit from `my_function` when `r` is destroyed
185
+ * \endcode
186
+ *
187
+ * The range object `r` is deterministically destroyed whenever `my_function`
188
+ * returns---ending the NVTX range without manual intervention. For more
189
+ * information, see \ref RANGES and `nvtx3::scoped_range_in`.
190
+ *
191
+ * Another inconvenience of the NVTX C APIs are the several constructs where the
192
+ * user is expected to initialize an object at the beginning of an application
193
+ * and reuse that object throughout the lifetime of the application. For example
194
+ * see domains, categories, and registered messages.
195
+ *
196
+ * Example:
197
+ * \code{.cpp}
198
+ * nvtxDomainHandle_t D = nvtxDomainCreateA("my domain");
199
+ * // Reuse `D` throughout the rest of the application
200
+ * \endcode
201
+ *
202
+ * This can be problematic if the user application or library does not have an
203
+ * explicit initialization function called before all other functions to
204
+ * ensure that these long-lived objects are initialized before being used.
205
+ *
206
+ * NVTX C++ makes use of the "construct on first use" technique to alleviate
207
+ * this inconvenience. In short, a function local static object is constructed
208
+ * upon the first invocation of a function and returns a reference to that
209
+ * object on all future invocations. See the documentation for `nvtx3::domain`,
210
+ * `nvtx3::named_category`, `nvtx3::registered_string`, and
211
+ * https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use for more
212
+ * information.
213
+ *
214
+ * Using construct on first use, the above example becomes:
215
+ * \code{.cpp}
216
+ * struct my_domain{ static constexpr char const* name{"my domain"}; };
217
+ *
218
+ * // The first invocation of `domain::get` for the type `my_domain` will
219
+ * // construct a `nvtx3::domain` object and return a reference to it. Future
220
+ * // invocations simply return a reference.
221
+ * nvtx3::domain const& D = nvtx3::domain::get<my_domain>();
222
+ * \endcode
223
+ * For more information about NVTX and how it can be used, see
224
+ * https://docs.nvidia.com/cuda/profiler-users-guide/index.html#nvtx and
225
+ * https://devblogs.nvidia.com/cuda-pro-tip-generate-custom-application-profile-timelines-nvtx/
226
+ * for more information.
227
+ *
228
+ * \section RANGES Ranges
229
+ *
230
+ * Ranges are used to describe a span of time during the execution of an
231
+ * application. Common examples are using ranges to annotate the time it takes
232
+ * to execute a function or an iteration of a loop.
233
+ *
234
+ * NVTX C++ uses RAII to automate the generation of ranges that are tied to the
235
+ * lifetime of objects. Similar to `std::lock_guard` in the C++ Standard
236
+ * Template Library.
237
+ *
238
+ * \subsection scoped_range Scoped Range
239
+ *
240
+ * `nvtx3::scoped_range_in` is a class that begins a range upon construction
241
+ * and ends the range at destruction. This is one of the most commonly used
242
+ * constructs in NVTX C++ and is useful for annotating spans of time on a
243
+ * particular thread. These ranges can be nested to arbitrary depths.
244
+ *
245
+ * `nvtx3::scoped_range` is an alias for a `nvtx3::scoped_range_in` in the
246
+ * global NVTX domain. For more information about Domains, see \ref DOMAINS.
247
+ *
248
+ * Various attributes of a range can be configured constructing a
249
+ * `nvtx3::scoped_range_in` with a `nvtx3::event_attributes` object. For
250
+ * more information, see \ref ATTRIBUTES.
251
+ *
252
+ * Example:
253
+ *
254
+ * \code{.cpp}
255
+ * void some_function() {
256
+ * // Creates a range for the duration of `some_function`
257
+ * nvtx3::scoped_range r{};
258
+ *
259
+ * while(true) {
260
+ * // Creates a range for every loop iteration
261
+ * // `loop_range` is nested inside `r`
262
+ * nvtx3::scoped_range loop_range{};
263
+ * }
264
+ * }
265
+ * \endcode
266
+ *
267
+ * \subsection unique_range Unique Range
268
+ *
269
+ * `nvtx3::unique_range` is similar to `nvtx3::scoped_range`, with a few key differences:
270
+ * - `unique_range` objects can be destroyed in any order whereas `scoped_range` objects must be
271
+ * destroyed in exact reverse creation order
272
+ * - `unique_range` can start and end on different threads
273
+ * - `unique_range` is movable
274
+ * - `unique_range` objects can be constructed as heap objects
275
+ *
276
+ * There is extra overhead associated with `unique_range` constructs and therefore use of
277
+ * `nvtx3::scoped_range_in` should be preferred.
278
+ *
279
+ * \section MARKS Marks
280
+ *
281
+ * `nvtx3::mark` annotates an instantaneous point in time with a "marker".
282
+ *
283
+ * Unlike a "range" which has a beginning and an end, a marker is a single event
284
+ * in an application, such as detecting a problem:
285
+ *
286
+ * \code{.cpp}
287
+ * bool success = do_operation(...);
288
+ * if (!success) {
289
+ * nvtx3::mark("operation failed!");
290
+ * }
291
+ * \endcode
292
+ *
293
+ * \section DOMAINS Domains
294
+ *
295
+ * Similar to C++ namespaces, domains allow for scoping NVTX events. By default,
296
+ * all NVTX events belong to the "global" domain. Libraries and applications
297
+ * should scope their events to use a custom domain to differentiate where the
298
+ * events originate from.
299
+ *
300
+ * It is common for a library or application to have only a single domain and
301
+ * for the name of that domain to be known at compile time. Therefore, Domains
302
+ * in NVTX C++ are represented by _tag types_.
303
+ *
304
+ * For example, to define a custom domain, simply define a new concrete type
305
+ * (a `class` or `struct`) with a `static` member called `name` that contains
306
+ * the desired name of the domain.
307
+ *
308
+ * \code{.cpp}
309
+ * struct my_domain{ static constexpr char const* name{"my domain"}; };
310
+ * \endcode
311
+ *
312
+ * For any NVTX C++ construct that can be scoped to a domain, the type
313
+ * `my_domain` can be passed as an explicit template argument to scope it to
314
+ * the custom domain.
315
+ *
316
+ * The tag type `nvtx3::domain::global` represents the global NVTX domain.
317
+ *
318
+ * \code{.cpp}
319
+ * // By default, `scoped_range_in` belongs to the global domain
320
+ * nvtx3::scoped_range_in<> r0{};
321
+ *
322
+ * // Alias for a `scoped_range_in` in the global domain
323
+ * nvtx3::scoped_range r1{};
324
+ *
325
+ * // `r` belongs to the custom domain
326
+ * nvtx3::scoped_range_in<my_domain> r{};
327
+ * \endcode
328
+ *
329
+ * When using a custom domain, it is recommended to define type aliases for NVTX
330
+ * constructs in the custom domain.
331
+ * \code{.cpp}
332
+ * using my_scoped_range = nvtx3::scoped_range_in<my_domain>;
333
+ * using my_registered_string = nvtx3::registered_string_in<my_domain>;
334
+ * using my_named_category = nvtx3::named_category_in<my_domain>;
335
+ * \endcode
336
+ *
337
+ * See `nvtx3::domain` for more information.
338
+ *
339
+ * \section ATTRIBUTES Event Attributes
340
+ *
341
+ * NVTX events can be customized with various attributes to provide additional
342
+ * information (such as a custom message) or to control visualization of the
343
+ * event (such as the color used). These attributes can be specified per-event
344
+ * via arguments to a `nvtx3::event_attributes` object.
345
+ *
346
+ * NVTX events can be customized via four "attributes":
347
+ * - \ref COLOR : color used to visualize the event in tools.
348
+ * - \ref MESSAGES : Custom message string.
349
+ * - \ref PAYLOAD : User-defined numerical value.
350
+ * - \ref CATEGORY : Intra-domain grouping.
351
+ *
352
+ * It is possible to construct a `nvtx3::event_attributes` from any number of
353
+ * attribute objects (nvtx3::color, nvtx3::message, nvtx3::payload,
354
+ * nvtx3::category) in any order. If an attribute is not specified, a tool
355
+ * specific default value is used. See `nvtx3::event_attributes` for more
356
+ * information.
357
+ *
358
+ * \code{.cpp}
359
+ * // Set message, same as passing nvtx3::message{"message"}
360
+ * nvtx3::event_attributes attr{"message"};
361
+ *
362
+ * // Set message and color
363
+ * nvtx3::event_attributes attr{"message", nvtx3::rgb{127, 255, 0}};
364
+ *
365
+ * // Set message, color, payload, category
366
+ * nvtx3::event_attributes attr{"message",
367
+ * nvtx3::rgb{127, 255, 0},
368
+ * nvtx3::payload{42},
369
+ * nvtx3::category{1}};
370
+ *
371
+ * // Same as above -- can use any order of arguments
372
+ * nvtx3::event_attributes attr{nvtx3::payload{42},
373
+ * nvtx3::category{1},
374
+ * "message",
375
+ * nvtx3::rgb{127, 255, 0}};
376
+ *
377
+ * // Multiple arguments of the same type are allowed, but only the first is
378
+ * // used -- in this example, payload is set to 42:
379
+ * nvtx3::event_attributes attr{ nvtx3::payload{42}, nvtx3::payload{7} };
380
+ *
381
+ * // Using the nvtx3 namespace in a local scope makes the syntax more succinct:
382
+ * using namespace nvtx3;
383
+ * event_attributes attr{"message", rgb{127, 255, 0}, payload{42}, category{1}};
384
+ * \endcode
385
+ *
386
+ * \subsection MESSAGES message
387
+ *
388
+ * `nvtx3::message` sets the message string for an NVTX event.
389
+ *
390
+ * Example:
391
+ * \code{.cpp}
392
+ * // Create an `event_attributes` with the message "my message"
393
+ * nvtx3::event_attributes attr{nvtx3::message{"my message"}};
394
+ *
395
+ * // strings and string literals implicitly assumed to be a `nvtx3::message`
396
+ * nvtx3::event_attributes attr{"my message"};
397
+ * \endcode
398
+ *
399
+ * \subsubsection REGISTERED_MESSAGE Registered Messages
400
+ *
401
+ * Associating a `nvtx3::message` with an event requires copying the contents of
402
+ * the message every time the message is used, i.e., copying the entire message
403
+ * string. This may cause non-trivial overhead in performance sensitive code.
404
+ *
405
+ * To eliminate this overhead, NVTX allows registering a message string,
406
+ * yielding a "handle" that is inexpensive to copy that may be used in place of
407
+ * a message string. When visualizing the events, tools such as Nsight Systems
408
+ * will take care of mapping the message handle to its string.
409
+ *
410
+ * A message should be registered once and the handle reused throughout the rest
411
+ * of the application. This can be done by either explicitly creating static
412
+ * `nvtx3::registered_string` objects, or using the
413
+ * `nvtx3::registered_string::get` construct on first use helper (recommended).
414
+ *
415
+ * Similar to \ref DOMAINS, `nvtx3::registered_string::get` requires defining a
416
+ * custom tag type with a static `message` member whose value will be the
417
+ * contents of the registered string.
418
+ *
419
+ * Example:
420
+ * \code{.cpp}
421
+ * // Explicitly constructed, static `registered_string` in my_domain:
422
+ * static registered_string_in<my_domain> static_message{"my message"};
423
+ *
424
+ * // Or use construct on first use:
425
+ * // Define a tag type with a `message` member string to register
426
+ * struct my_message{ static constexpr char const* message{ "my message" }; };
427
+ *
428
+ * // Uses construct on first use to register the contents of
429
+ * // `my_message::message`
430
+ * auto& msg = nvtx3::registered_string_in<my_domain>::get<my_message>();
431
+ * \endcode
432
+ *
433
+ * \subsection COLOR color
434
+ *
435
+ * Associating a `nvtx3::color` with an event allows controlling how the event
436
+ * is visualized in a tool such as Nsight Systems. This is a convenient way to
437
+ * visually differentiate among different events.
438
+ *
439
+ * \code{.cpp}
440
+ * // Define a color via rgb color values
441
+ * nvtx3::color c{nvtx3::rgb{127, 255, 0}};
442
+ * nvtx3::event_attributes attr{c};
443
+ *
444
+ * // rgb color values can be passed directly to an `event_attributes`
445
+ * nvtx3::event_attributes attr1{nvtx3::rgb{127,255,0}};
446
+ * \endcode
447
+ *
448
+ * \subsection CATEGORY category
449
+ *
450
+ * A `nvtx3::category` is simply an integer id that allows for fine-grain
451
+ * grouping of NVTX events. For example, one might use separate categories for
452
+ * IO, memory allocation, compute, etc.
453
+ *
454
+ * \code{.cpp}
455
+ * nvtx3::event_attributes{nvtx3::category{1}};
456
+ * \endcode
457
+ *
458
+ * \subsubsection NAMED_CATEGORIES Named Categories
459
+ *
460
+ * Associates a `name` string with a category `id` to help differentiate among
461
+ * categories.
462
+ *
463
+ * For any given category id `Id`, a `named_category{Id, "name"}` should only
464
+ * be constructed once and reused throughout an application. This can be done by
465
+ * either explicitly creating static `nvtx3::named_category` objects, or using
466
+ * the `nvtx3::named_category::get` construct on first use helper (recommended).
467
+ *
468
+ * Similar to \ref DOMAINS, `nvtx3::named_category::get` requires defining a
469
+ * custom tag type with static `name` and `id` members.
470
+ *
471
+ * \code{.cpp}
472
+ * // Explicitly constructed, static `named_category` in my_domain:
473
+ * static nvtx3::named_category_in<my_domain> static_category{42, "my category"};
474
+ *
475
+ * // Or use construct on first use:
476
+ * // Define a tag type with `name` and `id` members
477
+ * struct my_category {
478
+ * static constexpr char const* name{"my category"}; // category name
479
+ * static constexpr uint32_t id{42}; // category id
480
+ * };
481
+ *
482
+ * // Use construct on first use to name the category id `42`
483
+ * // with name "my category":
484
+ * auto& cat = named_category_in<my_domain>::get<my_category>();
485
+ *
486
+ * // Range `r` associated with category id `42`
487
+ * nvtx3::event_attributes attr{cat};
488
+ * \endcode
489
+ *
490
+ * \subsection PAYLOAD payload
491
+ *
492
+ * Allows associating a user-defined numerical value with an event.
493
+ *
494
+ * \code{.cpp}
495
+ * // Constructs a payload from the `int32_t` value 42
496
+ * nvtx3:: event_attributes attr{nvtx3::payload{42}};
497
+ * \endcode
498
+ *
499
+ *
500
+ * \section EXAMPLE Example
501
+ *
502
+ * Putting it all together:
503
+ * \code{.cpp}
504
+ * // Define a custom domain tag type
505
+ * struct my_domain{ static constexpr char const* name{"my domain"}; };
506
+ *
507
+ * // Define a named category tag type
508
+ * struct my_category{
509
+ * static constexpr char const* name{"my category"};
510
+ * static constexpr uint32_t id{42};
511
+ * };
512
+ *
513
+ * // Define a registered string tag type
514
+ * struct my_message{ static constexpr char const* message{"my message"}; };
515
+ *
516
+ * // For convenience, use aliases for domain scoped objects
517
+ * using my_scoped_range = nvtx3::scoped_range_in<my_domain>;
518
+ * using my_registered_string = nvtx3::registered_string_in<my_domain>;
519
+ * using my_named_category = nvtx3::named_category_in<my_domain>;
520
+ *
521
+ * // Default values for all attributes
522
+ * nvtx3::event_attributes attr{};
523
+ * my_scoped_range r0{attr};
524
+ *
525
+ * // Custom (unregistered) message, and unnamed category
526
+ * nvtx3::event_attributes attr1{"message", nvtx3::category{2}};
527
+ * my_scoped_range r1{attr1};
528
+ *
529
+ * // Alternatively, pass arguments of `event_attributes` constructor directly
530
+ * // to `my_scoped_range`
531
+ * my_scoped_range r2{"message", nvtx3::category{2}};
532
+ *
533
+ * // construct on first use a registered string
534
+ * auto& msg = my_registered_string::get<my_message>();
535
+ *
536
+ * // construct on first use a named category
537
+ * auto& cat = my_named_category::get<my_category>();
538
+ *
539
+ * // Use registered string and named category with a custom payload
540
+ * my_scoped_range r3{msg, cat, nvtx3::payload{42}};
541
+ *
542
+ * // Any number of arguments in any order
543
+ * my_scoped_range r{nvtx3::rgb{127, 255,0}, msg};
544
+ *
545
+ * \endcode
546
+ * \section MACROS Convenience Macros
547
+ *
548
+ * Oftentimes users want to quickly and easily add NVTX ranges to their library
549
+ * or application to aid in profiling and optimization.
550
+ *
551
+ * A convenient way to do this is to use the \ref NVTX3_FUNC_RANGE and
552
+ * \ref NVTX3_FUNC_RANGE_IN macros. These macros take care of constructing an
553
+ * `nvtx3::scoped_range_in` with the name of the enclosing function as the
554
+ * range's message.
555
+ *
556
+ * \code{.cpp}
557
+ * void some_function() {
558
+ * // Automatically generates an NVTX range for the duration of the function
559
+ * // using "some_function" as the event's message.
560
+ * NVTX3_FUNC_RANGE();
561
+ * }
562
+ * \endcode
563
+ *
564
+ */
565
+
566
+ /* Temporary helper #defines, removed with #undef at end of header */
567
+
568
+ /* Some compilers do not correctly support SFINAE, which is used in this API
569
+ * to detect common usage errors and provide clearer error messages (by using
570
+ * static_assert) than the compiler would produce otherwise. These compilers
571
+ * will generate errors while compiling this file such as:
572
+ *
573
+ * error: 'name' is not a member of 'nvtx3::v1::domain::global'
574
+ *
575
+ * The following compiler versions are known to have this problem, and so are
576
+ * set by default to disable the SFINAE-based checks:
577
+ *
578
+ * - All MSVC versions prior to VS2017 Update 7 (15.7)
579
+ * - GCC 8.1-8.3 (the problem was fixed in GCC 8.4)
580
+ *
581
+ * If you find your compiler hits this problem, you can work around it by
582
+ * defining NVTX3_USE_CHECKED_OVERLOADS_FOR_GET to 0 before including this
583
+ * header, or you can add a check for your compiler version to this #if.
584
+ * Also, please report the issue on the NVTX GitHub page.
585
+ */
586
+ #if !defined(NVTX3_USE_CHECKED_OVERLOADS_FOR_GET)
587
+ # if defined(_MSC_VER) && _MSC_VER < 1914 || defined(__GNUC__) && __GNUC__ == 8 && __GNUC_MINOR__ < 4
588
+ # define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET 0
589
+ # else
590
+ # define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET 1
591
+ # endif
592
+ # define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET_DEFINED_HERE
593
+ #endif
594
+
595
+ /* Within this header, nvtx3::NVTX3_VERSION_NAMESPACE resolves to nvtx3::vX,
596
+ * where "X" is the major version number. */
597
+ #define NVTX3_CONCAT(A, B) A##B
598
+ #define NVTX3_NAMESPACE_FOR(VERSION) NVTX3_CONCAT(v, VERSION)
599
+ #define NVTX3_VERSION_NAMESPACE NVTX3_NAMESPACE_FOR(NVTX3_CPP_VERSION_MAJOR)
600
+
601
+ /* Avoid duplicating #if defined(NVTX3_INLINE_THIS_VERSION) for namespaces
602
+ * in each minor version by making a macro to use unconditionally, which
603
+ * resolves to "inline" or nothing as appropriate. */
604
+ #if defined(NVTX3_INLINE_THIS_VERSION)
605
+ # define NVTX3_INLINE_IF_REQUESTED inline
606
+ #else
607
+ # define NVTX3_INLINE_IF_REQUESTED
608
+ #endif
609
+
610
+ /* Enables the use of constexpr when support for C++14 constexpr is present.
611
+ *
612
+ * Initialization of a class member that is a union to a specific union member
613
+ * can only be done in the body of a constructor, not in a member initializer
614
+ * list. A constexpr constructor must have an empty body until C++14, so there
615
+ * is no way to make an initializer of a member union constexpr in C++11. This
616
+ * macro allows making functions constexpr in C++14 or newer, but non-constexpr
617
+ * in C++11 compilation. It is used here on constructors that initialize their
618
+ * member unions.
619
+ */
620
+ #if __cpp_constexpr >= 201304L
621
+ # define NVTX3_CONSTEXPR_IF_CPP14 constexpr
622
+ #else
623
+ # define NVTX3_CONSTEXPR_IF_CPP14
624
+ #endif
625
+
626
+ // Macro wrappers for C++ attributes
627
+ #if !defined(__has_cpp_attribute)
628
+ # define __has_cpp_attribute(x) 0
629
+ #endif
630
+ #if __has_cpp_attribute(maybe_unused)
631
+ # define NVTX3_MAYBE_UNUSED [[maybe_unused]]
632
+ #else
633
+ # define NVTX3_MAYBE_UNUSED
634
+ #endif
635
+ #if __has_cpp_attribute(nodiscard)
636
+ # define NVTX3_NO_DISCARD [[nodiscard]]
637
+ #else
638
+ # define NVTX3_NO_DISCARD
639
+ #endif
640
+
641
+ /* Use a macro for static asserts, which defaults to static_assert, but that
642
+ * testing tools can replace with a logging function. For example:
643
+ * #define NVTX3_STATIC_ASSERT(c, m) \
644
+ * do { if (!(c)) printf("static_assert would fail: %s\n", m); } while (0)
645
+ */
646
+ #if !defined(NVTX3_STATIC_ASSERT)
647
+ # define NVTX3_STATIC_ASSERT(condition, message) static_assert(condition, message)
648
+ # define NVTX3_STATIC_ASSERT_DEFINED_HERE
649
+ #endif
650
+
651
+ /* Implementation sections, enclosed in guard macros for each minor version */
652
+
653
+ #ifndef NVTX3_CPP_DEFINITIONS_V1_0
654
+ # define NVTX3_CPP_DEFINITIONS_V1_0
655
+
656
+ # include <cstddef>
657
+ # include <memory>
658
+ # include <string>
659
+ # include <type_traits>
660
+ # include <utility>
661
+
662
+ # include <nvtx3/nvToolsExt.h>
663
+
664
+ namespace nvtx3
665
+ {
666
+
667
+ NVTX3_INLINE_IF_REQUESTED namespace NVTX3_VERSION_NAMESPACE
668
+ {
669
+ namespace detail
670
+ {
671
+
672
+ template <typename Unused>
673
+ struct always_false : std::false_type
674
+ {};
675
+
676
+ template <typename T, typename = void>
677
+ struct has_name : std::false_type
678
+ {};
679
+ template <typename T>
680
+ struct has_name<T, decltype((void) T::name, void())> : std::true_type
681
+ {};
682
+
683
+ template <typename T, typename = void>
684
+ struct has_id : std::false_type
685
+ {};
686
+ template <typename T>
687
+ struct has_id<T, decltype((void) T::id, void())> : std::true_type
688
+ {};
689
+
690
+ template <typename T, typename = void>
691
+ struct has_message : std::false_type
692
+ {};
693
+ template <typename T>
694
+ struct has_message<T, decltype((void) T::message, void())> : std::true_type
695
+ {};
696
+
697
+ template <typename T, typename = void>
698
+ struct is_c_string : std::false_type
699
+ {};
700
+ template <typename T>
701
+ struct is_c_string<T,
702
+ typename std::enable_if<std::is_convertible<T, char const*>::value
703
+ || std::is_convertible<T, wchar_t const*>::value>::type> : std::true_type
704
+ {};
705
+
706
+ template <typename T>
707
+ using is_uint32 = std::is_same<typename std::decay<T>::type, uint32_t>;
708
+
709
+ } // namespace detail
710
+
711
+ /**
712
+ * @brief `domain`s allow for grouping NVTX events into a single scope to
713
+ * differentiate them from events in other `domain`s.
714
+ *
715
+ * By default, all NVTX constructs are placed in the "global" NVTX domain.
716
+ *
717
+ * A custom `domain` may be used in order to differentiate a library's or
718
+ * application's NVTX events from other events.
719
+ *
720
+ * `domain`s are expected to be long-lived and unique to a library or
721
+ * application. As such, it is assumed a domain's name is known at compile
722
+ * time. Therefore, all NVTX constructs that can be associated with a domain
723
+ * require the domain to be specified via a *type* `D` passed as an
724
+ * explicit template parameter.
725
+ *
726
+ * The type `domain::global` may be used to indicate that the global NVTX
727
+ * domain should be used.
728
+ *
729
+ * None of the C++ NVTX constructs require the user to manually construct a
730
+ * `domain` object. Instead, if a custom domain is desired, the user is
731
+ * expected to define a type `D` that contains a member
732
+ * `D::name` which resolves to either a `char const*` or `wchar_t
733
+ * const*`. The value of `D::name` is used to name and uniquely
734
+ * identify the custom domain.
735
+ *
736
+ * Upon the first use of an NVTX construct associated with the type
737
+ * `D`, the "construct on first use" pattern is used to construct a
738
+ * function local static `domain` object. All future NVTX constructs
739
+ * associated with `D` will use a reference to the previously
740
+ * constructed `domain` object. See `domain::get`.
741
+ *
742
+ * Example:
743
+ * \code{.cpp}
744
+ * // The type `my_domain` defines a `name` member used to name and identify
745
+ * // the `domain` object identified by `my_domain`.
746
+ * struct my_domain{ static constexpr char const* name{"my_domain"}; };
747
+ *
748
+ * // The NVTX range `r` will be grouped with all other NVTX constructs
749
+ * // associated with `my_domain`.
750
+ * nvtx3::scoped_range_in<my_domain> r{};
751
+ *
752
+ * // An alias can be created for a `scoped_range_in` in the custom domain
753
+ * using my_scoped_range = nvtx3::scoped_range_in<my_domain>;
754
+ * my_scoped_range my_range{};
755
+ *
756
+ * // `domain::global` indicates that the global NVTX domain is used
757
+ * nvtx3::scoped_range_in<domain::global> r2{};
758
+ *
759
+ * // For convenience, `nvtx3::scoped_range` is an alias for a range in the
760
+ * // global domain
761
+ * nvtx3::scoped_range r3{};
762
+ * \endcode
763
+ */
764
+ class domain
765
+ {
766
+ public:
767
+ domain(domain const&) = delete;
768
+ domain& operator=(domain const&) = delete;
769
+ domain(domain&&) = delete;
770
+ domain& operator=(domain&&) = delete;
771
+
772
+ /**
773
+ * @brief Tag type for the "global" NVTX domain.
774
+ *
775
+ * This type may be passed as a template argument to any function/class
776
+ * expecting a type to identify a domain to indicate that the global domain
777
+ * should be used.
778
+ *
779
+ * All NVTX events in the global domain across all libraries and
780
+ * applications will be grouped together.
781
+ *
782
+ */
783
+ struct global
784
+ {};
785
+
786
+ # if NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
787
+ /**
788
+ * @brief Returns reference to an instance of a function local static
789
+ * `domain` object.
790
+ *
791
+ * Uses the "construct on first use" idiom to safely ensure the `domain`
792
+ * object is initialized exactly once upon first invocation of
793
+ * `domain::get<D>()`. All following invocations will return a
794
+ * reference to the previously constructed `domain` object. See
795
+ * https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use
796
+ *
797
+ * None of the constructs in this header require the user to directly invoke
798
+ * `domain::get`. It is automatically invoked when constructing objects like
799
+ * a `scoped_range_in` or `category`. Advanced users may wish to use
800
+ * `domain::get` for the convenience of the "construct on first use" idiom
801
+ * when using domains with their own use of the NVTX C API.
802
+ *
803
+ * This function is thread-safe as of C++11. If two or more threads call
804
+ * `domain::get<D>` concurrently, exactly one of them is guaranteed
805
+ * to construct the `domain` object and the other(s) will receive a
806
+ * reference to the object after it is fully constructed.
807
+ *
808
+ * The domain's name is specified via the type `D` pass as an
809
+ * explicit template parameter. `D` is required to contain a
810
+ * member `D::name` that resolves to either a `char const*` or
811
+ * `wchar_t const*`. The value of `D::name` is used to name and
812
+ * uniquely identify the `domain`.
813
+ *
814
+ * Example:
815
+ * \code{.cpp}
816
+ * // The type `my_domain` defines a `name` member used to name and identify
817
+ * // the `domain` object identified by `my_domain`.
818
+ * struct my_domain{ static constexpr char const* name{"my domain"}; };
819
+ *
820
+ * auto& D1 = domain::get<my_domain>(); // First invocation constructs a
821
+ * // `domain` with the name "my domain"
822
+ *
823
+ * auto& D2 = domain::get<my_domain>(); // Quickly returns reference to
824
+ * // previously constructed `domain`.
825
+ * \endcode
826
+ *
827
+ * @tparam D Type that contains a `D::name` member used to
828
+ * name the `domain` object.
829
+ * @return Reference to the `domain` corresponding to the type `D`.
830
+ */
831
+ template <typename D = global, typename std::enable_if<detail::is_c_string<decltype(D::name)>::value, int>::type = 0>
832
+ NVTX3_NO_DISCARD static domain const& get() noexcept
833
+ {
834
+ static domain const d(D::name);
835
+ return d;
836
+ }
837
+
838
+ /**
839
+ * @brief Overload of `domain::get` to provide a clear compile error when
840
+ * `D` has a `name` member that is not directly convertible to either
841
+ * `char const*` or `wchar_t const*`.
842
+ */
843
+ template <typename D = global,
844
+ typename std::enable_if<!detail::is_c_string<decltype(D::name)>::value, int>::type = 0>
845
+ NVTX3_NO_DISCARD static domain const& get() noexcept
846
+ {
847
+ NVTX3_STATIC_ASSERT(detail::always_false<D>::value,
848
+ "Type used to identify an NVTX domain must contain a static constexpr member "
849
+ "called 'name' of type const char* or const wchar_t* -- 'name' member is not "
850
+ "convertible to either of those types");
851
+ static domain const unused;
852
+ return unused; // Function must compile for static_assert to be triggered
853
+ }
854
+
855
+ /**
856
+ * @brief Overload of `domain::get` to provide a clear compile error when
857
+ * `D` does not have a `name` member.
858
+ */
859
+ template <typename D = global, typename std::enable_if<!detail::has_name<D>::value, int>::type = 0>
860
+ NVTX3_NO_DISCARD static domain const& get() noexcept
861
+ {
862
+ NVTX3_STATIC_ASSERT(detail::always_false<D>::value,
863
+ "Type used to identify an NVTX domain must contain a static constexpr member "
864
+ "called 'name' of type const char* or const wchar_t* -- 'name' member is missing");
865
+ static domain const unused;
866
+ return unused; // Function must compile for static_assert to be triggered
867
+ }
868
+ # else
869
+ template <typename D = global>
870
+ NVTX3_NO_DISCARD static domain const& get() noexcept
871
+ {
872
+ static domain const d(D::name);
873
+ return d;
874
+ }
875
+ # endif
876
+
877
+ /**
878
+ * @brief Conversion operator to `nvtxDomainHandle_t`.
879
+ *
880
+ * Allows transparently passing a domain object into an API expecting a
881
+ * native `nvtxDomainHandle_t` object.
882
+ */
883
+ operator nvtxDomainHandle_t() const noexcept
884
+ {
885
+ return _domain;
886
+ }
887
+
888
+ private:
889
+ /**
890
+ * @brief Construct a new domain with the specified `name`.
891
+ *
892
+ * This constructor is private as it is intended that `domain` objects only
893
+ * be created through the `domain::get` function.
894
+ *
895
+ * @param name A unique name identifying the domain
896
+ */
897
+ explicit domain(char const* name) noexcept
898
+ : _domain{nvtxDomainCreateA(name)}
899
+ {}
900
+
901
+ /**
902
+ * @brief Construct a new domain with the specified `name`.
903
+ *
904
+ * This constructor is private as it is intended that `domain` objects only
905
+ * be created through the `domain::get` function.
906
+ *
907
+ * @param name A unique name identifying the domain
908
+ */
909
+ explicit domain(wchar_t const* name) noexcept
910
+ : _domain{nvtxDomainCreateW(name)}
911
+ {}
912
+
913
+ /**
914
+ * @brief Construct a new domain with the specified `name`.
915
+ *
916
+ * This constructor is private as it is intended that `domain` objects only
917
+ * be created through the `domain::get` function.
918
+ *
919
+ * @param name A unique name identifying the domain
920
+ */
921
+ explicit domain(std::string const& name) noexcept
922
+ : domain{name.c_str()}
923
+ {}
924
+
925
+ /**
926
+ * @brief Construct a new domain with the specified `name`.
927
+ *
928
+ * This constructor is private as it is intended that `domain` objects only
929
+ * be created through the `domain::get` function.
930
+ *
931
+ * @param name A unique name identifying the domain
932
+ */
933
+ explicit domain(std::wstring const& name) noexcept
934
+ : domain{name.c_str()}
935
+ {}
936
+
937
+ /**
938
+ * @brief Default constructor creates a `domain` representing the
939
+ * "global" NVTX domain.
940
+ *
941
+ * All events not associated with a custom `domain` are grouped in the
942
+ * "global" NVTX domain.
943
+ *
944
+ */
945
+ constexpr domain() noexcept {}
946
+
947
+ /**
948
+ * @brief Intentionally avoid calling nvtxDomainDestroy on the `domain` object.
949
+ *
950
+ * No currently-available tools attempt to free domain resources when the
951
+ * nvtxDomainDestroy function is called, due to the thread-safety and
952
+ * efficiency challenges of freeing thread-local storage for other threads.
953
+ * Since libraries may be disallowed from introducing static destructors,
954
+ * and destroying the domain is likely to have no effect, the destructor
955
+ * for `domain` intentionally chooses to not destroy the domain.
956
+ *
957
+ * In a situation where domain destruction is necessary, either manually
958
+ * call nvtxDomainDestroy on the domain's handle, or make a class that
959
+ * derives from `domain` and calls nvtxDomainDestroy in its destructor.
960
+ */
961
+ ~domain() = default;
962
+
963
+ private:
964
+ nvtxDomainHandle_t const _domain{}; ///< The `domain`s NVTX handle
965
+ };
966
+
967
+ /**
968
+ * @brief Returns reference to the `domain` object that represents the global
969
+ * NVTX domain.
970
+ *
971
+ * This specialization for `domain::global` returns a default constructed,
972
+ * `domain` object for use when the "global" domain is desired.
973
+ *
974
+ * All NVTX events in the global domain across all libraries and applications
975
+ * will be grouped together.
976
+ *
977
+ * @return Reference to the `domain` corresponding to the global NVTX domain.
978
+ *
979
+ */
980
+ template <>
981
+ NVTX3_NO_DISCARD inline domain const& domain::get<domain::global>() noexcept
982
+ {
983
+ static domain const d{};
984
+ return d;
985
+ }
986
+
987
+ /**
988
+ * @brief Indicates the values of the red, green, and blue color channels for
989
+ * an RGB color to use as an event attribute (assumes no transparency).
990
+ *
991
+ */
992
+ struct rgb
993
+ {
994
+ /// Type used for component values
995
+ using component_type = uint8_t;
996
+
997
+ /**
998
+ * @brief Construct a rgb with red, green, and blue channels
999
+ * specified by `red_`, `green_`, and `blue_`, respectively.
1000
+ *
1001
+ * Valid values are in the range `[0,255]`.
1002
+ *
1003
+ * @param red_ Value of the red channel
1004
+ * @param green_ Value of the green channel
1005
+ * @param blue_ Value of the blue channel
1006
+ */
1007
+ constexpr rgb(component_type red_, component_type green_, component_type blue_) noexcept
1008
+ : red{red_}
1009
+ , green{green_}
1010
+ , blue{blue_}
1011
+ {}
1012
+
1013
+ component_type red{}; ///< Red channel value
1014
+ component_type green{}; ///< Green channel value
1015
+ component_type blue{}; ///< Blue channel value
1016
+ };
1017
+
1018
+ /**
1019
+ * @brief Indicates the value of the alpha, red, green, and blue color
1020
+ * channels for an ARGB color to use as an event attribute.
1021
+ *
1022
+ */
1023
+ struct argb final : rgb
1024
+ {
1025
+ /**
1026
+ * @brief Construct an argb with alpha, red, green, and blue channels
1027
+ * specified by `alpha_`, `red_`, `green_`, and `blue_`, respectively.
1028
+ *
1029
+ * Valid values are in the range `[0,255]`.
1030
+ *
1031
+ * @param alpha_ Value of the alpha channel (opacity)
1032
+ * @param red_ Value of the red channel
1033
+ * @param green_ Value of the green channel
1034
+ * @param blue_ Value of the blue channel
1035
+ *
1036
+ */
1037
+ constexpr argb(component_type alpha_, component_type red_, component_type green_, component_type blue_) noexcept
1038
+ : rgb{red_, green_, blue_}
1039
+ , alpha{alpha_}
1040
+ {}
1041
+
1042
+ component_type alpha{}; ///< Alpha channel value
1043
+ };
1044
+
1045
+ /**
1046
+ * @brief Represents a custom color that can be associated with an NVTX event
1047
+ * via its `event_attributes`.
1048
+ *
1049
+ * Specifying colors for NVTX events is a convenient way to visually
1050
+ * differentiate among different events in a visualization tool such as Nsight
1051
+ * Systems.
1052
+ *
1053
+ */
1054
+ class color
1055
+ {
1056
+ public:
1057
+ /// Type used for the color's value
1058
+ using value_type = uint32_t;
1059
+
1060
+ /**
1061
+ * @brief Constructs a `color` using the value provided by `hex_code`.
1062
+ *
1063
+ * `hex_code` is expected to be a 4 byte argb hex code.
1064
+ *
1065
+ * The most significant byte indicates the value of the alpha channel
1066
+ * (opacity) (0-255)
1067
+ *
1068
+ * The next byte indicates the value of the red channel (0-255)
1069
+ *
1070
+ * The next byte indicates the value of the green channel (0-255)
1071
+ *
1072
+ * The least significant byte indicates the value of the blue channel
1073
+ * (0-255)
1074
+ *
1075
+ * @param hex_code The hex code used to construct the `color`
1076
+ */
1077
+ constexpr explicit color(value_type hex_code) noexcept
1078
+ : _value{hex_code}
1079
+ {}
1080
+
1081
+ /**
1082
+ * @brief Construct a `color` using the alpha, red, green, blue components
1083
+ * in `argb`.
1084
+ *
1085
+ * @param argb_ The alpha, red, green, blue components of the desired `color`
1086
+ */
1087
+ constexpr color(argb argb_) noexcept
1088
+ : color{from_bytes_msb_to_lsb(argb_.alpha, argb_.red, argb_.green, argb_.blue)}
1089
+ {}
1090
+
1091
+ /**
1092
+ * @brief Construct a `color` using the red, green, blue components in
1093
+ * `rgb`.
1094
+ *
1095
+ * Uses maximum value for the alpha channel (opacity) of the `color`.
1096
+ *
1097
+ * @param rgb_ The red, green, blue components of the desired `color`
1098
+ */
1099
+ constexpr color(rgb rgb_) noexcept
1100
+ : color{from_bytes_msb_to_lsb(0xFF, rgb_.red, rgb_.green, rgb_.blue)}
1101
+ {}
1102
+
1103
+ /**
1104
+ * @brief Returns the `color`s argb hex code
1105
+ *
1106
+ */
1107
+ constexpr value_type get_value() const noexcept
1108
+ {
1109
+ return _value;
1110
+ }
1111
+
1112
+ /**
1113
+ * @brief Return the NVTX color type of the color.
1114
+ *
1115
+ */
1116
+ constexpr nvtxColorType_t get_type() const noexcept
1117
+ {
1118
+ return _type;
1119
+ }
1120
+
1121
+ color() = delete;
1122
+ ~color() = default;
1123
+ color(color const&) = default;
1124
+ color& operator=(color const&) = default;
1125
+ color(color&&) = default;
1126
+ color& operator=(color&&) = default;
1127
+
1128
+ private:
1129
+ /**
1130
+ * @brief Constructs an unsigned, 4B integer from the component bytes in
1131
+ * most to least significant byte order.
1132
+ *
1133
+ */
1134
+ constexpr static value_type
1135
+ from_bytes_msb_to_lsb(uint8_t byte3, uint8_t byte2, uint8_t byte1, uint8_t byte0) noexcept
1136
+ {
1137
+ return uint32_t{byte3} << 24 | uint32_t{byte2} << 16 | uint32_t{byte1} << 8 | uint32_t{byte0};
1138
+ }
1139
+
1140
+ value_type _value{}; ///< color's argb color code
1141
+ nvtxColorType_t _type{NVTX_COLOR_ARGB}; ///< NVTX color type code
1142
+ };
1143
+
1144
+ /**
1145
+ * @brief Object for intra-domain grouping of NVTX events.
1146
+ *
1147
+ * A `category` is simply an integer id that allows for fine-grain grouping of
1148
+ * NVTX events. For example, one might use separate categories for IO, memory
1149
+ * allocation, compute, etc.
1150
+ *
1151
+ * Example:
1152
+ * \code{.cpp}
1153
+ * nvtx3::category cat1{1};
1154
+ *
1155
+ * // Range `r1` belongs to the category identified by the value `1`.
1156
+ * nvtx3::scoped_range r1{cat1};
1157
+ *
1158
+ * // Range `r2` belongs to the same category as `r1`
1159
+ * nvtx3::scoped_range r2{nvtx3::category{1}};
1160
+ * \endcode
1161
+ *
1162
+ * To associate a name string with a category id, see `named_category`.
1163
+ *
1164
+ */
1165
+ class category
1166
+ {
1167
+ public:
1168
+ /// Type used for `category`s integer id.
1169
+ using id_type = uint32_t;
1170
+
1171
+ /**
1172
+ * @brief Construct a `category` with the specified `id`.
1173
+ *
1174
+ * The `category` will be unnamed and identified only by its `id` value.
1175
+ *
1176
+ * All `category`s in a domain sharing the same `id` are equivalent.
1177
+ *
1178
+ * @param[in] id The `category`'s identifying value
1179
+ */
1180
+ constexpr explicit category(id_type id) noexcept
1181
+ : id_{id}
1182
+ {}
1183
+
1184
+ /**
1185
+ * @brief Returns the id of the category.
1186
+ *
1187
+ */
1188
+ constexpr id_type get_id() const noexcept
1189
+ {
1190
+ return id_;
1191
+ }
1192
+
1193
+ category() = delete;
1194
+ ~category() = default;
1195
+ category(category const&) = default;
1196
+ category& operator=(category const&) = default;
1197
+ category(category&&) = default;
1198
+ category& operator=(category&&) = default;
1199
+
1200
+ private:
1201
+ id_type id_{}; ///< category's unique identifier
1202
+ };
1203
+
1204
+ /**
1205
+ * @brief A `category` with an associated name string.
1206
+ *
1207
+ * Associates a `name` string with a category `id` to help differentiate among
1208
+ * categories.
1209
+ *
1210
+ * For any given category id `Id`, a `named_category(Id, "name")` should only
1211
+ * be constructed once and reused throughout an application. This can be done
1212
+ * by either explicitly creating static `named_category` objects, or using the
1213
+ * `named_category::get` construct on first use helper (recommended).
1214
+ *
1215
+ * Creating two or more `named_category` objects with the same value for `id`
1216
+ * in the same domain results in undefined behavior.
1217
+ *
1218
+ * Similarly, behavior is undefined when a `named_category` and `category`
1219
+ * share the same value of `id`.
1220
+ *
1221
+ * Example:
1222
+ * \code{.cpp}
1223
+ * // Explicitly constructed, static `named_category` in global domain:
1224
+ * static nvtx3::named_category static_category{42, "my category"};
1225
+ *
1226
+ * // Range `r` associated with category id `42`
1227
+ * nvtx3::scoped_range r{static_category};
1228
+ *
1229
+ * // OR use construct on first use:
1230
+ *
1231
+ * // Define a type with `name` and `id` members
1232
+ * struct my_category {
1233
+ * static constexpr char const* name{"my category"}; // category name
1234
+ * static constexpr uint32_t id{42}; // category id
1235
+ * };
1236
+ *
1237
+ * // Use construct on first use to name the category id `42`
1238
+ * // with name "my category"
1239
+ * auto& cat = named_category_in<my_domain>::get<my_category>();
1240
+ *
1241
+ * // Range `r` associated with category id `42`
1242
+ * nvtx3::scoped_range r{cat};
1243
+ * \endcode
1244
+ *
1245
+ * `named_category_in<D>`'s association of a name to a category id is local to
1246
+ * the domain specified by the type `D`. An id may have a different name in
1247
+ * another domain.
1248
+ *
1249
+ * @tparam D Type containing `name` member used to identify the `domain` to
1250
+ * which the `named_category_in` belongs. Else, `domain::global` to indicate
1251
+ * that the global NVTX domain should be used.
1252
+ */
1253
+ template <typename D = domain::global>
1254
+ class named_category_in final : public category
1255
+ {
1256
+ public:
1257
+ # if NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
1258
+ /**
1259
+ * @brief Returns a global instance of a `named_category_in` as a
1260
+ * function-local static.
1261
+ *
1262
+ * Creates a `named_category_in<D>` with name and id specified by the contents
1263
+ * of a type `C`. `C::name` determines the name and `C::id` determines the
1264
+ * category id.
1265
+ *
1266
+ * This function is useful for constructing a named `category` exactly once
1267
+ * and reusing the same instance throughout an application.
1268
+ *
1269
+ * Example:
1270
+ * \code{.cpp}
1271
+ * // Define a type with `name` and `id` members
1272
+ * struct my_category {
1273
+ * static constexpr char const* name{"my category"}; // category name
1274
+ * static constexpr uint32_t id{42}; // category id
1275
+ * };
1276
+ *
1277
+ * // Use construct on first use to name the category id `42`
1278
+ * // with name "my category"
1279
+ * auto& cat = named_category_in<my_domain>::get<my_category>();
1280
+ *
1281
+ * // Range `r` associated with category id `42`
1282
+ * nvtx3::scoped_range r{cat};
1283
+ * \endcode
1284
+ *
1285
+ * Uses the "construct on first use" idiom to safely ensure the `category`
1286
+ * object is initialized exactly once. See
1287
+ * https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use
1288
+ *
1289
+ * @tparam C Type containing a member `C::name` that resolves to either a
1290
+ * `char const*` or `wchar_t const*` and `C::id`.
1291
+ */
1292
+ template <
1293
+ typename C,
1294
+ typename std::enable_if<detail::is_c_string<decltype(C::name)>::value && detail::is_uint32<decltype(C::id)>::value,
1295
+ int>::type = 0>
1296
+ static named_category_in const& get() noexcept
1297
+ {
1298
+ static named_category_in const cat(C::id, C::name);
1299
+ return cat;
1300
+ }
1301
+
1302
+ /**
1303
+ * @brief Overload of `named_category_in::get` to provide a clear compile error
1304
+ * when `C` has the required `name` and `id` members, but they are not the
1305
+ * required types. `name` must be directly convertible to `char const*` or
1306
+ * `wchar_t const*`, and `id` must be `uint32_t`.
1307
+ */
1308
+ template <typename C,
1309
+ typename std::enable_if<!detail::is_c_string<decltype(C::name)>::value
1310
+ || !detail::is_uint32<decltype(C::id)>::value,
1311
+ int>::type = 0>
1312
+ NVTX3_NO_DISCARD static named_category_in const& get() noexcept
1313
+ {
1314
+ NVTX3_STATIC_ASSERT(detail::is_c_string<decltype(C::name)>::value,
1315
+ "Type used to name an NVTX category must contain a static constexpr member "
1316
+ "called 'name' of type const char* or const wchar_t* -- 'name' member is not "
1317
+ "convertible to either of those types");
1318
+ NVTX3_STATIC_ASSERT(detail::is_uint32<decltype(C::id)>::value,
1319
+ "Type used to name an NVTX category must contain a static constexpr member "
1320
+ "called 'id' of type uint32_t -- 'id' member is the wrong type");
1321
+ static named_category_in const unused;
1322
+ return unused; // Function must compile for static_assert to be triggered
1323
+ }
1324
+
1325
+ /**
1326
+ * @brief Overload of `named_category_in::get` to provide a clear compile error
1327
+ * when `C` does not have the required `name` and `id` members.
1328
+ */
1329
+ template <typename C,
1330
+ typename std::enable_if<!detail::has_name<C>::value || !detail::has_id<C>::value, int>::type = 0>
1331
+ NVTX3_NO_DISCARD static named_category_in const& get() noexcept
1332
+ {
1333
+ NVTX3_STATIC_ASSERT(detail::has_name<C>::value,
1334
+ "Type used to name an NVTX category must contain a static constexpr member "
1335
+ "called 'name' of type const char* or const wchar_t* -- 'name' member is missing");
1336
+ NVTX3_STATIC_ASSERT(detail::has_id<C>::value,
1337
+ "Type used to name an NVTX category must contain a static constexpr member "
1338
+ "called 'id' of type uint32_t -- 'id' member is missing");
1339
+ static named_category_in const unused;
1340
+ return unused; // Function must compile for static_assert to be triggered
1341
+ }
1342
+ # else
1343
+ template <typename C>
1344
+ NVTX3_NO_DISCARD static named_category_in const& get() noexcept
1345
+ {
1346
+ static named_category_in const cat(C::id, C::name);
1347
+ return cat;
1348
+ }
1349
+ # endif
1350
+
1351
+ private:
1352
+ // Default constructor is only used internally for static_assert(false) cases.
1353
+ named_category_in() noexcept
1354
+ : category{0}
1355
+ {}
1356
+
1357
+ public:
1358
+ /**
1359
+ * @brief Construct a `named_category_in` with the specified `id` and `name`.
1360
+ *
1361
+ * The name `name` will be registered with `id`.
1362
+ *
1363
+ * Every unique value of `id` should only be named once.
1364
+ *
1365
+ * @param[in] id The category id to name
1366
+ * @param[in] name The name to associated with `id`
1367
+ */
1368
+ named_category_in(id_type id, char const* name) noexcept
1369
+ : category{id}
1370
+ {
1371
+ # ifndef NVTX_DISABLE
1372
+ nvtxDomainNameCategoryA(domain::get<D>(), get_id(), name);
1373
+ # else
1374
+ (void) id;
1375
+ (void) name;
1376
+ # endif
1377
+ }
1378
+
1379
+ /**
1380
+ * @brief Construct a `named_category_in` with the specified `id` and `name`.
1381
+ *
1382
+ * The name `name` will be registered with `id`.
1383
+ *
1384
+ * Every unique value of `id` should only be named once.
1385
+ *
1386
+ * @param[in] id The category id to name
1387
+ * @param[in] name The name to associated with `id`
1388
+ */
1389
+ named_category_in(id_type id, wchar_t const* name) noexcept
1390
+ : category{id}
1391
+ {
1392
+ # ifndef NVTX_DISABLE
1393
+ nvtxDomainNameCategoryW(domain::get<D>(), get_id(), name);
1394
+ # else
1395
+ (void) id;
1396
+ (void) name;
1397
+ # endif
1398
+ }
1399
+ };
1400
+
1401
+ /**
1402
+ * @brief Alias for a `named_category_in` in the global NVTX domain.
1403
+ *
1404
+ */
1405
+ using named_category = named_category_in<domain::global>;
1406
+
1407
+ /**
1408
+ * @brief A message registered with NVTX.
1409
+ *
1410
+ * Normally, associating a `message` with an NVTX event requires copying the
1411
+ * contents of the message string. This may cause non-trivial overhead in
1412
+ * highly performance sensitive regions of code.
1413
+ *
1414
+ * message registration is an optimization to lower the overhead of
1415
+ * associating a message with an NVTX event. Registering a message yields a
1416
+ * handle that is inexpensive to copy that may be used in place of a message
1417
+ * string.
1418
+ *
1419
+ * A particular message should only be registered once and the handle
1420
+ * reused throughout the rest of the application. This can be done by either
1421
+ * explicitly creating static `registered_string_in` objects, or using the
1422
+ * `registered_string_in::get` construct on first use helper (recommended).
1423
+ *
1424
+ * Example:
1425
+ * \code{.cpp}
1426
+ * // Explicitly constructed, static `registered_string` in my_domain:
1427
+ * static registered_string_in<my_domain> static_message{"message"};
1428
+ *
1429
+ * // "message" is associated with the range `r`
1430
+ * nvtx3::scoped_range r{static_message};
1431
+ *
1432
+ * // Or use construct on first use:
1433
+ *
1434
+ * // Define a type with a `message` member that defines the contents of the
1435
+ * // registered string
1436
+ * struct my_message{ static constexpr char const* message{ "my message" }; };
1437
+ *
1438
+ * // Uses construct on first use to register the contents of
1439
+ * // `my_message::message`
1440
+ * auto& msg = registered_string_in<my_domain>::get<my_message>();
1441
+ *
1442
+ * // "my message" is associated with the range `r`
1443
+ * nvtx3::scoped_range r{msg};
1444
+ * \endcode
1445
+ *
1446
+ * `registered_string_in`s are local to a particular domain specified via
1447
+ * the type `D`.
1448
+ *
1449
+ * @tparam D Type containing `name` member used to identify the `domain` to
1450
+ * which the `registered_string_in` belongs. Else, `domain::global` to indicate
1451
+ * that the global NVTX domain should be used.
1452
+ */
1453
+ template <typename D = domain::global>
1454
+ class registered_string_in
1455
+ {
1456
+ public:
1457
+ # if NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
1458
+ /**
1459
+ * @brief Returns a global instance of a `registered_string_in` as a function
1460
+ * local static.
1461
+ *
1462
+ * Provides a convenient way to register a message with NVTX without having
1463
+ * to explicitly register the message.
1464
+ *
1465
+ * Upon first invocation, constructs a `registered_string_in` whose contents
1466
+ * are specified by `message::message`.
1467
+ *
1468
+ * All future invocations will return a reference to the object constructed
1469
+ * in the first invocation.
1470
+ *
1471
+ * Example:
1472
+ * \code{.cpp}
1473
+ * // Define a type with a `message` member that defines the contents of the
1474
+ * // registered string
1475
+ * struct my_message{ static constexpr char const* message{ "my message" };
1476
+ * };
1477
+ *
1478
+ * // Uses construct on first use to register the contents of
1479
+ * // `my_message::message`
1480
+ * auto& msg = registered_string_in<my_domain>::get<my_message>();
1481
+ *
1482
+ * // "my message" is associated with the range `r`
1483
+ * nvtx3::scoped_range r{msg};
1484
+ * \endcode
1485
+ *
1486
+ * @tparam M Type required to contain a member `M::message` that
1487
+ * resolves to either a `char const*` or `wchar_t const*` used as the
1488
+ * registered string's contents.
1489
+ * @return Reference to a `registered_string_in` associated with the type `M`.
1490
+ */
1491
+ template <typename M, typename std::enable_if<detail::is_c_string<decltype(M::message)>::value, int>::type = 0>
1492
+ NVTX3_NO_DISCARD static registered_string_in const& get() noexcept
1493
+ {
1494
+ static registered_string_in const regstr(M::message);
1495
+ return regstr;
1496
+ }
1497
+
1498
+ /**
1499
+ * @brief Overload of `registered_string_in::get` to provide a clear compile error
1500
+ * when `M` has a `message` member that is not directly convertible to either
1501
+ * `char const*` or `wchar_t const*`.
1502
+ */
1503
+ template <typename M, typename std::enable_if<!detail::is_c_string<decltype(M::message)>::value, int>::type = 0>
1504
+ NVTX3_NO_DISCARD static registered_string_in const& get() noexcept
1505
+ {
1506
+ NVTX3_STATIC_ASSERT(detail::always_false<M>::value,
1507
+ "Type used to register an NVTX string must contain a static constexpr member "
1508
+ "called 'message' of type const char* or const wchar_t* -- 'message' member is "
1509
+ "not convertible to either of those types");
1510
+ static registered_string_in const unused;
1511
+ return unused; // Function must compile for static_assert to be triggered
1512
+ }
1513
+
1514
+ /**
1515
+ * @brief Overload of `registered_string_in::get` to provide a clear compile error when
1516
+ * `M` does not have a `message` member.
1517
+ */
1518
+ template <typename M, typename std::enable_if<!detail::has_message<M>::value, int>::type = 0>
1519
+ NVTX3_NO_DISCARD static registered_string_in const& get() noexcept
1520
+ {
1521
+ NVTX3_STATIC_ASSERT(detail::always_false<M>::value,
1522
+ "Type used to register an NVTX string must contain a static constexpr member "
1523
+ "called 'message' of type const char* or const wchar_t* -- 'message' member "
1524
+ "is missing");
1525
+ static registered_string_in const unused;
1526
+ return unused; // Function must compile for static_assert to be triggered
1527
+ }
1528
+ # else
1529
+ template <typename M>
1530
+ NVTX3_NO_DISCARD static registered_string_in const& get() noexcept
1531
+ {
1532
+ static registered_string_in const regstr(M::message);
1533
+ return regstr;
1534
+ }
1535
+ # endif
1536
+
1537
+ /**
1538
+ * @brief Constructs a `registered_string_in` from the specified `msg` string.
1539
+ *
1540
+ * Registers `msg` with NVTX and associates a handle with the registered
1541
+ * message.
1542
+ *
1543
+ * A particular message should should only be registered once and the handle
1544
+ * reused throughout the rest of the application.
1545
+ *
1546
+ * @param msg The contents of the message
1547
+ */
1548
+ explicit registered_string_in(char const* msg) noexcept
1549
+ : handle_{nvtxDomainRegisterStringA(domain::get<D>(), msg)}
1550
+ {}
1551
+
1552
+ /**
1553
+ * @brief Constructs a `registered_string_in` from the specified `msg` string.
1554
+ *
1555
+ * Registers `msg` with NVTX and associates a handle with the registered
1556
+ * message.
1557
+ *
1558
+ * A particular message should should only be registered once and the handle
1559
+ * reused throughout the rest of the application.
1560
+ *
1561
+ * @param msg The contents of the message
1562
+ */
1563
+ explicit registered_string_in(std::string const& msg) noexcept
1564
+ : registered_string_in{msg.c_str()}
1565
+ {}
1566
+
1567
+ /**
1568
+ * @brief Constructs a `registered_string_in` from the specified `msg` string.
1569
+ *
1570
+ * Registers `msg` with NVTX and associates a handle with the registered
1571
+ * message.
1572
+ *
1573
+ * A particular message should should only be registered once and the handle
1574
+ * reused throughout the rest of the application.
1575
+ *
1576
+ * @param msg The contents of the message
1577
+ */
1578
+ explicit registered_string_in(wchar_t const* msg) noexcept
1579
+ : handle_{nvtxDomainRegisterStringW(domain::get<D>(), msg)}
1580
+ {}
1581
+
1582
+ /**
1583
+ * @brief Constructs a `registered_string_in` from the specified `msg` string.
1584
+ *
1585
+ * Registers `msg` with NVTX and associates a handle with the registered
1586
+ * message.
1587
+ *
1588
+ * A particular message should only be registered once and the handle
1589
+ * reused throughout the rest of the application.
1590
+ *
1591
+ * @param msg The contents of the message
1592
+ */
1593
+ explicit registered_string_in(std::wstring const& msg) noexcept
1594
+ : registered_string_in{msg.c_str()}
1595
+ {}
1596
+
1597
+ /**
1598
+ * @brief Returns the registered string's handle
1599
+ *
1600
+ */
1601
+ nvtxStringHandle_t get_handle() const noexcept
1602
+ {
1603
+ return handle_;
1604
+ }
1605
+
1606
+ private:
1607
+ // Default constructor is only used internally for static_assert(false) cases.
1608
+ registered_string_in() noexcept {}
1609
+
1610
+ public:
1611
+ ~registered_string_in() = default;
1612
+ registered_string_in(registered_string_in const&) = default;
1613
+ registered_string_in& operator=(registered_string_in const&) = default;
1614
+ registered_string_in(registered_string_in&&) = default;
1615
+ registered_string_in& operator=(registered_string_in&&) = default;
1616
+
1617
+ private:
1618
+ nvtxStringHandle_t handle_{}; ///< The handle returned from
1619
+ ///< registering the message with NVTX
1620
+ };
1621
+
1622
+ /**
1623
+ * @brief Alias for a `registered_string_in` in the global NVTX domain.
1624
+ *
1625
+ */
1626
+ using registered_string = registered_string_in<domain::global>;
1627
+
1628
+ /**
1629
+ * @brief Allows associating a message string with an NVTX event via
1630
+ * its `EventAttribute`s.
1631
+ *
1632
+ * Associating a `message` with an NVTX event through its `event_attributes`
1633
+ * allows for naming events to easily differentiate them from other events.
1634
+ *
1635
+ * Every time an NVTX event is created with an associated `message`, the
1636
+ * contents of the message string must be copied. This may cause non-trivial
1637
+ * overhead in highly performance sensitive sections of code. Use of a
1638
+ * `nvtx3::registered_string` is recommended in these situations.
1639
+ *
1640
+ * Example:
1641
+ * \code{.cpp}
1642
+ * // Creates an `event_attributes` with message "message 0"
1643
+ * nvtx3::event_attributes attr0{nvtx3::message{"message 0"}};
1644
+ *
1645
+ * // `range0` contains message "message 0"
1646
+ * nvtx3::scoped_range range0{attr0};
1647
+ *
1648
+ * // `std::string` and string literals are implicitly assumed to be
1649
+ * // the contents of an `nvtx3::message`
1650
+ * // Creates an `event_attributes` with message "message 1"
1651
+ * nvtx3::event_attributes attr1{"message 1"};
1652
+ *
1653
+ * // `range1` contains message "message 1"
1654
+ * nvtx3::scoped_range range1{attr1};
1655
+ *
1656
+ * // `range2` contains message "message 2"
1657
+ * nvtx3::scoped_range range2{nvtx3::message{"message 2"}};
1658
+ *
1659
+ * // `std::string` and string literals are implicitly assumed to be
1660
+ * // the contents of an `nvtx3::message`
1661
+ * // `range3` contains message "message 3"
1662
+ * nvtx3::scoped_range range3{"message 3"};
1663
+ * \endcode
1664
+ */
1665
+ class message
1666
+ {
1667
+ public:
1668
+ using value_type = nvtxMessageValue_t;
1669
+
1670
+ /**
1671
+ * @brief Construct a `message` whose contents are specified by `msg`.
1672
+ *
1673
+ * @param msg The contents of the message
1674
+ */
1675
+ NVTX3_CONSTEXPR_IF_CPP14 message(char const* msg) noexcept
1676
+ : type_{NVTX_MESSAGE_TYPE_ASCII}
1677
+ {
1678
+ value_.ascii = msg;
1679
+ }
1680
+
1681
+ /**
1682
+ * @brief Construct a `message` whose contents are specified by `msg`.
1683
+ *
1684
+ * @param msg The contents of the message
1685
+ */
1686
+ message(std::string const& msg) noexcept
1687
+ : message{msg.c_str()}
1688
+ {}
1689
+
1690
+ /**
1691
+ * @brief Disallow construction for `std::string` r-value
1692
+ *
1693
+ * `message` is a non-owning type and therefore cannot take ownership of an
1694
+ * r-value. Therefore, constructing from an r-value is disallowed to prevent
1695
+ * a dangling pointer.
1696
+ *
1697
+ */
1698
+ message(std::string&&) = delete;
1699
+
1700
+ /**
1701
+ * @brief Construct a `message` whose contents are specified by `msg`.
1702
+ *
1703
+ * @param msg The contents of the message
1704
+ */
1705
+ NVTX3_CONSTEXPR_IF_CPP14 message(wchar_t const* msg) noexcept
1706
+ : type_{NVTX_MESSAGE_TYPE_UNICODE}
1707
+ {
1708
+ value_.unicode = msg;
1709
+ }
1710
+
1711
+ /**
1712
+ * @brief Construct a `message` whose contents are specified by `msg`.
1713
+ *
1714
+ * @param msg The contents of the message
1715
+ */
1716
+ message(std::wstring const& msg) noexcept
1717
+ : message{msg.c_str()}
1718
+ {}
1719
+
1720
+ /**
1721
+ * @brief Disallow construction for `std::wstring` r-value
1722
+ *
1723
+ * `message` is a non-owning type and therefore cannot take ownership of an
1724
+ * r-value. Therefore, constructing from an r-value is disallowed to prevent
1725
+ * a dangling pointer.
1726
+ *
1727
+ */
1728
+ message(std::wstring&&) = delete;
1729
+
1730
+ /**
1731
+ * @brief Construct a `message` from a `registered_string_in`.
1732
+ *
1733
+ * @tparam D Type containing `name` member used to identify the `domain`
1734
+ * to which the `registered_string_in` belongs. Else, `domain::global` to
1735
+ * indicate that the global NVTX domain should be used.
1736
+ * @param msg The message that has already been registered with NVTX.
1737
+ */
1738
+ template <typename D>
1739
+ NVTX3_CONSTEXPR_IF_CPP14 message(registered_string_in<D> const& msg) noexcept
1740
+ : type_{NVTX_MESSAGE_TYPE_REGISTERED}
1741
+ {
1742
+ value_.registered = msg.get_handle();
1743
+ }
1744
+
1745
+ /**
1746
+ * @brief Construct a `message` from NVTX C API type and value.
1747
+ *
1748
+ * @param type nvtxMessageType_t enum value indicating type of the payload
1749
+ * @param value nvtxMessageValue_t union containing message
1750
+ */
1751
+ constexpr message(nvtxMessageType_t const& type, nvtxMessageValue_t const& value) noexcept
1752
+ : type_{type}
1753
+ , value_(value)
1754
+ {}
1755
+
1756
+ /**
1757
+ * @brief Construct a `message` from NVTX C API registered string handle.
1758
+ *
1759
+ * @param handle nvtxStringHandle_t value of registered string handle
1760
+ */
1761
+ NVTX3_CONSTEXPR_IF_CPP14 message(nvtxStringHandle_t handle) noexcept
1762
+ : type_{NVTX_MESSAGE_TYPE_REGISTERED}
1763
+ {
1764
+ value_.registered = handle;
1765
+ }
1766
+
1767
+ /**
1768
+ * @brief Return the union holding the value of the message.
1769
+ *
1770
+ */
1771
+ constexpr value_type get_value() const noexcept
1772
+ {
1773
+ return value_;
1774
+ }
1775
+
1776
+ /**
1777
+ * @brief Return the type information about the value the union holds.
1778
+ *
1779
+ */
1780
+ constexpr nvtxMessageType_t get_type() const noexcept
1781
+ {
1782
+ return type_;
1783
+ }
1784
+
1785
+ private:
1786
+ nvtxMessageType_t type_{}; ///< message type
1787
+ nvtxMessageValue_t value_{}; ///< message contents
1788
+ };
1789
+
1790
+ /**
1791
+ * @brief A numerical value that can be associated with an NVTX event via
1792
+ * its `event_attributes`.
1793
+ *
1794
+ * Example:
1795
+ * \code{.cpp}
1796
+ * // Constructs a payload from the int32_t value 42
1797
+ * nvtx3:: event_attributes attr{nvtx3::payload{42}};
1798
+ *
1799
+ * // `range0` will have an int32_t payload of 42
1800
+ * nvtx3::scoped_range range0{attr};
1801
+ *
1802
+ * // range1 has double payload of 3.14
1803
+ * nvtx3::scoped_range range1{nvtx3::payload{3.14}};
1804
+ * \endcode
1805
+ */
1806
+ class payload
1807
+ {
1808
+ public:
1809
+ using value_type = typename nvtxEventAttributes_v2::payload_t;
1810
+
1811
+ /**
1812
+ * @brief Construct a `payload` from a signed, 8 byte integer.
1813
+ *
1814
+ * @param value Value to use as contents of the payload
1815
+ */
1816
+ NVTX3_CONSTEXPR_IF_CPP14 explicit payload(int64_t value) noexcept
1817
+ : type_{NVTX_PAYLOAD_TYPE_INT64}
1818
+ , value_{}
1819
+ {
1820
+ value_.llValue = value;
1821
+ }
1822
+
1823
+ /**
1824
+ * @brief Construct a `payload` from a signed, 4 byte integer.
1825
+ *
1826
+ * @param value Value to use as contents of the payload
1827
+ */
1828
+ NVTX3_CONSTEXPR_IF_CPP14 explicit payload(int32_t value) noexcept
1829
+ : type_{NVTX_PAYLOAD_TYPE_INT32}
1830
+ , value_{}
1831
+ {
1832
+ value_.iValue = value;
1833
+ }
1834
+
1835
+ /**
1836
+ * @brief Construct a `payload` from an unsigned, 8 byte integer.
1837
+ *
1838
+ * @param value Value to use as contents of the payload
1839
+ */
1840
+ NVTX3_CONSTEXPR_IF_CPP14 explicit payload(uint64_t value) noexcept
1841
+ : type_{NVTX_PAYLOAD_TYPE_UNSIGNED_INT64}
1842
+ , value_{}
1843
+ {
1844
+ value_.ullValue = value;
1845
+ }
1846
+
1847
+ /**
1848
+ * @brief Construct a `payload` from an unsigned, 4 byte integer.
1849
+ *
1850
+ * @param value Value to use as contents of the payload
1851
+ */
1852
+ NVTX3_CONSTEXPR_IF_CPP14 explicit payload(uint32_t value) noexcept
1853
+ : type_{NVTX_PAYLOAD_TYPE_UNSIGNED_INT32}
1854
+ , value_{}
1855
+ {
1856
+ value_.uiValue = value;
1857
+ }
1858
+
1859
+ /**
1860
+ * @brief Construct a `payload` from a single-precision floating point
1861
+ * value.
1862
+ *
1863
+ * @param value Value to use as contents of the payload
1864
+ */
1865
+ NVTX3_CONSTEXPR_IF_CPP14 explicit payload(float value) noexcept
1866
+ : type_{NVTX_PAYLOAD_TYPE_FLOAT}
1867
+ , value_{}
1868
+ {
1869
+ value_.fValue = value;
1870
+ }
1871
+
1872
+ /**
1873
+ * @brief Construct a `payload` from a double-precision floating point
1874
+ * value.
1875
+ *
1876
+ * @param value Value to use as contents of the payload
1877
+ */
1878
+ NVTX3_CONSTEXPR_IF_CPP14 explicit payload(double value) noexcept
1879
+ : type_{NVTX_PAYLOAD_TYPE_DOUBLE}
1880
+ , value_{}
1881
+ {
1882
+ value_.dValue = value;
1883
+ }
1884
+
1885
+ /**
1886
+ * @brief Construct a `payload` from NVTX C API type and value.
1887
+ *
1888
+ * @param type nvtxPayloadType_t enum value indicating type of the payload
1889
+ * @param value nvtxEventAttributes_t::payload_t union containing payload
1890
+ */
1891
+ constexpr payload(nvtxPayloadType_t const& type, value_type const& value) noexcept
1892
+ : type_{type}
1893
+ , value_(value)
1894
+ {}
1895
+
1896
+ /**
1897
+ * @brief Return the union holding the value of the payload
1898
+ *
1899
+ */
1900
+ constexpr value_type get_value() const noexcept
1901
+ {
1902
+ return value_;
1903
+ }
1904
+
1905
+ /**
1906
+ * @brief Return the information about the type the union holds.
1907
+ *
1908
+ */
1909
+ constexpr nvtxPayloadType_t get_type() const noexcept
1910
+ {
1911
+ return type_;
1912
+ }
1913
+
1914
+ private:
1915
+ nvtxPayloadType_t type_; ///< Type of the payload value
1916
+ value_type value_; ///< Union holding the payload value
1917
+ };
1918
+
1919
+ /**
1920
+ * @brief Describes the attributes of a NVTX event.
1921
+ *
1922
+ * NVTX events can be customized via four "attributes":
1923
+ *
1924
+ * - color: color used to visualize the event in tools such as Nsight
1925
+ * Systems. See `color`.
1926
+ * - message: Custom message string. See `message`.
1927
+ * - payload: User-defined numerical value. See `payload`.
1928
+ * - category: Intra-domain grouping. See `category`.
1929
+ *
1930
+ * These component attributes are specified via an `event_attributes` object.
1931
+ * See `nvtx3::color`, `nvtx3::message`, `nvtx3::payload`, and
1932
+ * `nvtx3::category` for how these individual attributes are constructed.
1933
+ *
1934
+ * While it is possible to specify all four attributes, it is common to want
1935
+ * to only specify a subset of attributes and use default values for the
1936
+ * others. For convenience, `event_attributes` can be constructed from any
1937
+ * number of attribute components in any order.
1938
+ *
1939
+ * Example:
1940
+ * \code{.cpp}
1941
+ * // Set message, same as using nvtx3::message{"message"}
1942
+ * event_attributes attr{"message"};
1943
+ *
1944
+ * // Set message and color
1945
+ * event_attributes attr{"message", nvtx3::rgb{127, 255, 0}};
1946
+ *
1947
+ * // Set message, color, payload, category
1948
+ * event_attributes attr{"message",
1949
+ * nvtx3::rgb{127, 255, 0},
1950
+ * nvtx3::payload{42},
1951
+ * nvtx3::category{1}};
1952
+ *
1953
+ * // Same as above -- can use any order of arguments
1954
+ * event_attributes attr{nvtx3::payload{42},
1955
+ * nvtx3::category{1},
1956
+ * "message",
1957
+ * nvtx3::rgb{127, 255, 0}};
1958
+ *
1959
+ * // Multiple arguments of the same type are allowed, but only the first is
1960
+ * // used -- in this example, payload is set to 42:
1961
+ * event_attributes attr{ nvtx3::payload{42}, nvtx3::payload{7} };
1962
+ *
1963
+ * // Range `r` will be customized according the attributes in `attr`
1964
+ * nvtx3::scoped_range r{attr};
1965
+ *
1966
+ * // For convenience, `event_attributes` constructor arguments may be passed
1967
+ * // to the `scoped_range_in` constructor -- they are forwarded to the
1968
+ * // `event_attributes` constructor
1969
+ * nvtx3::scoped_range r{nvtx3::payload{42}, nvtx3::category{1}, "message"};
1970
+ *
1971
+ * // Using the nvtx3 namespace in a local scope makes the syntax more succinct:
1972
+ * using namespace nvtx3;
1973
+ * scoped_range r{payload{42}, category{1}, "message"};
1974
+ * \endcode
1975
+ *
1976
+ */
1977
+ class event_attributes
1978
+ {
1979
+ public:
1980
+ using value_type = nvtxEventAttributes_t;
1981
+
1982
+ /**
1983
+ * @brief Default constructor creates an `event_attributes` with no
1984
+ * category, color, payload, nor message.
1985
+ */
1986
+ constexpr event_attributes() noexcept
1987
+ : attributes_{
1988
+ NVTX_VERSION, // version
1989
+ sizeof(nvtxEventAttributes_t), // size
1990
+ 0, // category
1991
+ NVTX_COLOR_UNKNOWN, // color type
1992
+ 0, // color value
1993
+ NVTX_PAYLOAD_UNKNOWN, // payload type
1994
+ 0, // reserved 4B
1995
+ {0}, // payload value (union)
1996
+ NVTX_MESSAGE_UNKNOWN, // message type
1997
+ {0} // message value (union)
1998
+ }
1999
+ {}
2000
+
2001
+ /**
2002
+ * @brief Variadic constructor where the first argument is a `category`.
2003
+ *
2004
+ * Sets the value of the `EventAttribute`s category based on `c` and
2005
+ * forwards the remaining variadic parameter pack to the next constructor.
2006
+ *
2007
+ */
2008
+ template <typename... Args>
2009
+ NVTX3_CONSTEXPR_IF_CPP14 explicit event_attributes(category const& c, Args const&... args) noexcept
2010
+ : event_attributes(args...)
2011
+ {
2012
+ attributes_.category = c.get_id();
2013
+ }
2014
+
2015
+ /**
2016
+ * @brief Variadic constructor where the first argument is a `color`.
2017
+ *
2018
+ * Sets the value of the `EventAttribute`s color based on `c` and forwards
2019
+ * the remaining variadic parameter pack to the next constructor.
2020
+ *
2021
+ */
2022
+ template <typename... Args>
2023
+ NVTX3_CONSTEXPR_IF_CPP14 explicit event_attributes(color const& c, Args const&... args) noexcept
2024
+ : event_attributes(args...)
2025
+ {
2026
+ attributes_.color = c.get_value();
2027
+ attributes_.colorType = c.get_type();
2028
+ }
2029
+
2030
+ /**
2031
+ * @brief Variadic constructor where the first argument is a `payload`.
2032
+ *
2033
+ * Sets the value of the `EventAttribute`s payload based on `p` and forwards
2034
+ * the remaining variadic parameter pack to the next constructor.
2035
+ *
2036
+ */
2037
+ template <typename... Args>
2038
+ NVTX3_CONSTEXPR_IF_CPP14 explicit event_attributes(payload const& p, Args const&... args) noexcept
2039
+ : event_attributes(args...)
2040
+ {
2041
+ attributes_.payload = p.get_value();
2042
+ attributes_.payloadType = p.get_type();
2043
+ }
2044
+
2045
+ /**
2046
+ * @brief Variadic constructor where the first argument is a `message`.
2047
+ *
2048
+ * Sets the value of the `EventAttribute`s message based on `m` and forwards
2049
+ * the remaining variadic parameter pack to the next constructor.
2050
+ *
2051
+ */
2052
+ template <typename... Args>
2053
+ NVTX3_CONSTEXPR_IF_CPP14 explicit event_attributes(message const& m, Args const&... args) noexcept
2054
+ : event_attributes(args...)
2055
+ {
2056
+ attributes_.message = m.get_value();
2057
+ attributes_.messageType = m.get_type();
2058
+ }
2059
+
2060
+ ~event_attributes() = default;
2061
+ event_attributes(event_attributes const&) = default;
2062
+ event_attributes& operator=(event_attributes const&) = default;
2063
+ event_attributes(event_attributes&&) = default;
2064
+ event_attributes& operator=(event_attributes&&) = default;
2065
+
2066
+ /**
2067
+ * @brief Get raw pointer to underlying NVTX attributes object.
2068
+ *
2069
+ */
2070
+ constexpr value_type const* get() const noexcept
2071
+ {
2072
+ return &attributes_;
2073
+ }
2074
+
2075
+ private:
2076
+ value_type attributes_{}; ///< The NVTX attributes structure
2077
+ };
2078
+
2079
+ /**
2080
+ * @brief A RAII object for creating a NVTX range local to a thread within a
2081
+ * domain.
2082
+ *
2083
+ * When constructed, begins a nested NVTX range on the calling thread in the
2084
+ * specified domain. Upon destruction, ends the NVTX range.
2085
+ *
2086
+ * Behavior is undefined if a `scoped_range_in` object is
2087
+ * created/destroyed on different threads.
2088
+ *
2089
+ * `scoped_range_in` is neither movable nor copyable.
2090
+ *
2091
+ * `scoped_range_in`s may be nested within other ranges.
2092
+ *
2093
+ * The domain of the range is specified by the template type parameter `D`.
2094
+ * By default, the `domain::global` is used, which scopes the range to the
2095
+ * global NVTX domain. The convenience alias `scoped_range` is provided for
2096
+ * ranges scoped to the global domain.
2097
+ *
2098
+ * A custom domain can be defined by creating a type, `D`, with a static
2099
+ * member `D::name` whose value is used to name the domain associated with
2100
+ * `D`. `D::name` must resolve to either `char const*` or `wchar_t const*`
2101
+ *
2102
+ * Example:
2103
+ * \code{.cpp}
2104
+ * // Define a type `my_domain` with a member `name` used to name the domain
2105
+ * // associated with the type `my_domain`.
2106
+ * struct my_domain{
2107
+ * static constexpr char const* name{"my domain"};
2108
+ * };
2109
+ * \endcode
2110
+ *
2111
+ * Usage:
2112
+ * \code{.cpp}
2113
+ * nvtx3::scoped_range_in<my_domain> r1{"range 1"}; // Range in my domain
2114
+ *
2115
+ * // Three equivalent ways to make a range in the global domain:
2116
+ * nvtx3::scoped_range_in<nvtx3::domain::global> r2{"range 2"};
2117
+ * nvtx3::scoped_range_in<> r3{"range 3"};
2118
+ * nvtx3::scoped_range r4{"range 4"};
2119
+ *
2120
+ * // Create an alias to succinctly make ranges in my domain:
2121
+ * using my_scoped_range = nvtx3::scoped_range_in<my_domain>;
2122
+ *
2123
+ * my_scoped_range r3{"range 3"};
2124
+ * \endcode
2125
+ */
2126
+ template <class D = domain::global>
2127
+ class NVTX3_MAYBE_UNUSED scoped_range_in
2128
+ {
2129
+ public:
2130
+ /**
2131
+ * @brief Construct a `scoped_range_in` with the specified
2132
+ * `event_attributes`
2133
+ *
2134
+ * Example:
2135
+ * \code{cpp}
2136
+ * nvtx3::event_attributes attr{"msg", nvtx3::rgb{127,255,0}};
2137
+ * nvtx3::scoped_range range{attr}; // Creates a range with message contents
2138
+ * // "msg" and green color
2139
+ * \endcode
2140
+ *
2141
+ * @param[in] attr `event_attributes` that describes the desired attributes
2142
+ * of the range.
2143
+ */
2144
+ explicit scoped_range_in(event_attributes const& attr) noexcept
2145
+ {
2146
+ # ifndef NVTX_DISABLE
2147
+ nvtxDomainRangePushEx(domain::get<D>(), attr.get());
2148
+ # else
2149
+ (void) attr;
2150
+ # endif
2151
+ }
2152
+
2153
+ /**
2154
+ * @brief Constructs a `scoped_range_in` from the constructor arguments
2155
+ * of an `event_attributes`.
2156
+ *
2157
+ * Forwards the arguments `args...` to construct an
2158
+ * `event_attributes` object. The `event_attributes` object is then
2159
+ * associated with the `scoped_range_in`.
2160
+ *
2161
+ * For more detail, see `event_attributes` documentation.
2162
+ *
2163
+ * Example:
2164
+ * \code{cpp}
2165
+ * // Creates a range with message "message" and green color
2166
+ * nvtx3::scoped_range r{"message", nvtx3::rgb{127,255,0}};
2167
+ * \endcode
2168
+ *
2169
+ * @param[in] args Arguments to used to construct an `event_attributes` associated with this
2170
+ * range.
2171
+ *
2172
+ */
2173
+ template <typename... Args>
2174
+ explicit scoped_range_in(Args const&... args) noexcept
2175
+ : scoped_range_in{event_attributes{args...}}
2176
+ {}
2177
+
2178
+ /**
2179
+ * @brief Default constructor creates a `scoped_range_in` with no
2180
+ * message, color, payload, nor category.
2181
+ *
2182
+ */
2183
+ scoped_range_in() noexcept
2184
+ : scoped_range_in{event_attributes{}}
2185
+ {}
2186
+
2187
+ /**
2188
+ * @brief Delete `operator new` to disallow heap allocated objects.
2189
+ *
2190
+ * `scoped_range_in` must follow RAII semantics to guarantee proper push/pop semantics.
2191
+ *
2192
+ */
2193
+ void* operator new(std::size_t) = delete;
2194
+
2195
+ scoped_range_in(scoped_range_in const&) = delete;
2196
+ scoped_range_in& operator=(scoped_range_in const&) = delete;
2197
+ scoped_range_in(scoped_range_in&&) = delete;
2198
+ scoped_range_in& operator=(scoped_range_in&&) = delete;
2199
+
2200
+ /**
2201
+ * @brief Destroy the scoped_range_in, ending the NVTX range event.
2202
+ */
2203
+ ~scoped_range_in() noexcept
2204
+ {
2205
+ # ifndef NVTX_DISABLE
2206
+ nvtxDomainRangePop(domain::get<D>());
2207
+ # endif
2208
+ }
2209
+ };
2210
+
2211
+ /**
2212
+ * @brief Alias for a `scoped_range_in` in the global NVTX domain.
2213
+ *
2214
+ */
2215
+ using scoped_range = scoped_range_in<domain::global>;
2216
+
2217
+ namespace detail
2218
+ {
2219
+
2220
+ /// @cond internal
2221
+ template <typename D = domain::global>
2222
+ class NVTX3_MAYBE_UNUSED optional_scoped_range_in
2223
+ {
2224
+ public:
2225
+ optional_scoped_range_in() = default;
2226
+
2227
+ void begin(event_attributes const& attr) noexcept
2228
+ {
2229
+ # ifndef NVTX_DISABLE
2230
+ // This class is not meant to be part of the public NVTX C++ API and should
2231
+ // only be used in the `NVTX3_FUNC_RANGE_IF` and `NVTX3_FUNC_RANGE_IF_IN`
2232
+ // macros. However, to prevent developers from misusing this class, make
2233
+ // sure to not start multiple ranges.
2234
+ if (initialized)
2235
+ {
2236
+ return;
2237
+ }
2238
+
2239
+ nvtxDomainRangePushEx(domain::get<D>(), attr.get());
2240
+ initialized = true;
2241
+ # endif
2242
+ }
2243
+
2244
+ ~optional_scoped_range_in() noexcept
2245
+ {
2246
+ # ifndef NVTX_DISABLE
2247
+ if (initialized)
2248
+ {
2249
+ nvtxDomainRangePop(domain::get<D>());
2250
+ }
2251
+ # endif
2252
+ }
2253
+
2254
+ void* operator new(std::size_t) = delete;
2255
+ optional_scoped_range_in(optional_scoped_range_in const&) = delete;
2256
+ optional_scoped_range_in& operator=(optional_scoped_range_in const&) = delete;
2257
+ optional_scoped_range_in(optional_scoped_range_in&&) = delete;
2258
+ optional_scoped_range_in& operator=(optional_scoped_range_in&&) = delete;
2259
+
2260
+ private:
2261
+ # ifndef NVTX_DISABLE
2262
+ bool initialized = false;
2263
+ # endif
2264
+ };
2265
+ /// @endcond
2266
+
2267
+ } // namespace detail
2268
+
2269
+ /**
2270
+ * @brief Handle used for correlating explicit range start and end events.
2271
+ *
2272
+ * A handle is "null" if it does not correspond to any range.
2273
+ *
2274
+ */
2275
+ struct range_handle
2276
+ {
2277
+ /// Type used for the handle's value
2278
+ using value_type = nvtxRangeId_t;
2279
+
2280
+ /**
2281
+ * @brief Construct a `range_handle` from the given id.
2282
+ *
2283
+ */
2284
+ constexpr explicit range_handle(value_type id) noexcept
2285
+ : _range_id{id}
2286
+ {}
2287
+
2288
+ /**
2289
+ * @brief Constructs a null range handle.
2290
+ *
2291
+ * A null range_handle corresponds to no range. Calling `end_range` on a
2292
+ * null handle is undefined behavior when a tool is active.
2293
+ *
2294
+ */
2295
+ constexpr range_handle() noexcept = default;
2296
+
2297
+ /**
2298
+ * @brief Checks whether this handle is null
2299
+ *
2300
+ * Provides contextual conversion to `bool`.
2301
+ *
2302
+ * \code{cpp}
2303
+ * range_handle handle{};
2304
+ * if (handle) {...}
2305
+ * \endcode
2306
+ *
2307
+ */
2308
+ constexpr explicit operator bool() const noexcept
2309
+ {
2310
+ return get_value() != null_range_id;
2311
+ }
2312
+
2313
+ /**
2314
+ * @brief Implicit conversion from `nullptr` constructs a null handle.
2315
+ *
2316
+ * Satisfies the "NullablePointer" requirement to make `range_handle` comparable with `nullptr`.
2317
+ *
2318
+ */
2319
+ constexpr range_handle(std::nullptr_t) noexcept {}
2320
+
2321
+ /**
2322
+ * @brief Returns the `range_handle`'s value
2323
+ *
2324
+ * @return value_type The handle's value
2325
+ */
2326
+ constexpr value_type get_value() const noexcept
2327
+ {
2328
+ return _range_id;
2329
+ }
2330
+
2331
+ private:
2332
+ /// Sentinel value for a null handle that corresponds to no range
2333
+ static constexpr value_type null_range_id = nvtxRangeId_t{0};
2334
+
2335
+ value_type _range_id{null_range_id}; ///< The underlying NVTX range id
2336
+ };
2337
+
2338
+ /**
2339
+ * @brief Compares two range_handles for equality
2340
+ *
2341
+ * @param lhs The first range_handle to compare
2342
+ * @param rhs The second range_handle to compare
2343
+ */
2344
+ inline constexpr bool operator==(range_handle lhs, range_handle rhs) noexcept
2345
+ {
2346
+ return lhs.get_value() == rhs.get_value();
2347
+ }
2348
+
2349
+ /**
2350
+ * @brief Compares two range_handles for inequality
2351
+ *
2352
+ * @param lhs The first range_handle to compare
2353
+ * @param rhs The second range_handle to compare
2354
+ */
2355
+ inline constexpr bool operator!=(range_handle lhs, range_handle rhs) noexcept
2356
+ {
2357
+ return !(lhs == rhs);
2358
+ }
2359
+
2360
+ /**
2361
+ * @brief Manually begin an NVTX range.
2362
+ *
2363
+ * Explicitly begins an NVTX range and returns a unique handle. To end the
2364
+ * range, pass the handle to `end_range_in<D>()`.
2365
+ *
2366
+ * `nvtx3::start_range(...)` is equivalent to `nvtx3::start_range_in<>(...)` and
2367
+ * `nvtx3::start_range_in<nvtx3::domain::global>(...)`.
2368
+ *
2369
+ * `start_range_in/end_range_in` are the most explicit and lowest level APIs
2370
+ * provided for creating ranges. Use of `nvtx3::unique_range_in` should be
2371
+ * preferred unless one is unable to tie the range to the lifetime of an object.
2372
+ *
2373
+ * Example:
2374
+ * \code{.cpp}
2375
+ * nvtx3::event_attributes attr{"msg", nvtx3::rgb{127,255,0}};
2376
+ * // Manually begin a range
2377
+ * nvtx3::range_handle h = nvtx3::start_range_in<my_domain>(attr);
2378
+ * ...
2379
+ * nvtx3::end_range_in<my_domain>(h); // End the range
2380
+ * \endcode
2381
+ *
2382
+ * @tparam D Type containing `name` member used to identify the `domain`
2383
+ * to which the range belongs. Else, `domain::global` to indicate that the
2384
+ * global NVTX domain should be used.
2385
+ * @param[in] attr `event_attributes` that describes the desired attributes
2386
+ * of the range.
2387
+ * @return Unique handle to be passed to `end_range_in` to end the range.
2388
+ */
2389
+ template <typename D = domain::global>
2390
+ NVTX3_NO_DISCARD inline range_handle start_range_in(event_attributes const& attr) noexcept
2391
+ {
2392
+ # ifndef NVTX_DISABLE
2393
+ return range_handle{nvtxDomainRangeStartEx(domain::get<D>(), attr.get())};
2394
+ # else
2395
+ (void) attr;
2396
+ return {};
2397
+ # endif
2398
+ }
2399
+
2400
+ /**
2401
+ * @brief Manually begin an NVTX range.
2402
+ *
2403
+ * Explicitly begins an NVTX range and returns a unique handle. To end the
2404
+ * range, pass the handle to `end_range_in<D>()`.
2405
+ *
2406
+ * `nvtx3::start_range(...)` is equivalent to `nvtx3::start_range_in<>(...)` and
2407
+ * `nvtx3::start_range_in<nvtx3::domain::global>(...)`.
2408
+ *
2409
+ * `start_range_in/end_range_in` are the most explicit and lowest level APIs
2410
+ * provided for creating ranges. Use of `nvtx3::unique_range_in` should be
2411
+ * preferred unless one is unable to tie the range to the lifetime of an object.
2412
+ *
2413
+ * This overload uses `args...` to construct an `event_attributes` to
2414
+ * associate with the range. For more detail, see `event_attributes`.
2415
+ *
2416
+ * Example:
2417
+ * \code{cpp}
2418
+ * // Manually begin a range
2419
+ * nvtx3::range_handle h = nvtx3::start_range_in<D>("msg", nvtx3::rgb{127,255,0});
2420
+ * ...
2421
+ * nvtx3::end_range_in<D>(h); // Ends the range
2422
+ * \endcode
2423
+ *
2424
+ * @tparam D Type containing `name` member used to identify the `domain`
2425
+ * to which the range belongs. Else, `domain::global` to indicate that the
2426
+ * global NVTX domain should be used.
2427
+ * @param[in] args Variadic parameter pack of the arguments for an `event_attributes`.
2428
+ * @return Unique handle to be passed to `end_range` to end the range.
2429
+ */
2430
+ template <typename D = domain::global, typename... Args>
2431
+ NVTX3_NO_DISCARD inline range_handle start_range_in(Args const&... args) noexcept
2432
+ {
2433
+ # ifndef NVTX_DISABLE
2434
+ return start_range_in<D>(event_attributes{args...});
2435
+ # else
2436
+ return {};
2437
+ # endif
2438
+ }
2439
+
2440
+ /**
2441
+ * @brief Manually begin an NVTX range in the global domain.
2442
+ *
2443
+ * Explicitly begins an NVTX range and returns a unique handle. To end the
2444
+ * range, pass the handle to `end_range()`.
2445
+ *
2446
+ * `nvtx3::start_range(...)` is equivalent to `nvtx3::start_range_in<>(...)` and
2447
+ * `nvtx3::start_range_in<nvtx3::domain::global>(...)`.
2448
+ *
2449
+ * `start_range/end_range` are the most explicit and lowest level APIs
2450
+ * provided for creating ranges. Use of `nvtx3::unique_range` should be
2451
+ * preferred unless one is unable to tie the range to the lifetime of an object.
2452
+ *
2453
+ * Example:
2454
+ * \code{.cpp}
2455
+ * nvtx3::event_attributes attr{"msg", nvtx3::rgb{127,255,0}};
2456
+ * // Manually begin a range
2457
+ * nvtx3::range_handle h = nvtx3::start_range(attr);
2458
+ * ...
2459
+ * nvtx3::end_range(h); // End the range
2460
+ * \endcode
2461
+ *
2462
+ * @param[in] attr `event_attributes` that describes the desired attributes
2463
+ * of the range.
2464
+ * @return Unique handle to be passed to `end_range_in` to end the range.
2465
+ */
2466
+ NVTX3_NO_DISCARD inline range_handle start_range(event_attributes const& attr) noexcept
2467
+ {
2468
+ # ifndef NVTX_DISABLE
2469
+ return start_range_in<domain::global>(attr);
2470
+ # else
2471
+ (void) attr;
2472
+ return {};
2473
+ # endif
2474
+ }
2475
+
2476
+ /**
2477
+ * @brief Manually begin an NVTX range in the global domain.
2478
+ *
2479
+ * Explicitly begins an NVTX range and returns a unique handle. To end the
2480
+ * range, pass the handle to `end_range_in<D>()`.
2481
+ *
2482
+ * `nvtx3::start_range(...)` is equivalent to `nvtx3::start_range_in<>(...)` and
2483
+ * `nvtx3::start_range_in<nvtx3::domain::global>(...)`.
2484
+ *
2485
+ * `start_range_in/end_range_in` are the most explicit and lowest level APIs
2486
+ * provided for creating ranges. Use of `nvtx3::unique_range_in` should be
2487
+ * preferred unless one is unable to tie the range to the lifetime of an object.
2488
+ *
2489
+ * This overload uses `args...` to construct an `event_attributes` to
2490
+ * associate with the range. For more detail, see `event_attributes`.
2491
+ *
2492
+ * Example:
2493
+ * \code{cpp}
2494
+ * // Manually begin a range
2495
+ * nvtx3::range_handle h = nvtx3::start_range("msg", nvtx3::rgb{127,255,0});
2496
+ * ...
2497
+ * nvtx3::end_range(h); // Ends the range
2498
+ * \endcode
2499
+ *
2500
+ * @param[in] args Variadic parameter pack of the arguments for an `event_attributes`.
2501
+ * @return Unique handle to be passed to `end_range` to end the range.
2502
+ */
2503
+ template <typename... Args>
2504
+ NVTX3_NO_DISCARD inline range_handle start_range(Args const&... args) noexcept
2505
+ {
2506
+ # ifndef NVTX_DISABLE
2507
+ return start_range_in<domain::global>(args...);
2508
+ # else
2509
+ return {};
2510
+ # endif
2511
+ }
2512
+
2513
+ /**
2514
+ * @brief Manually end the range associated with the handle `r` in domain `D`.
2515
+ *
2516
+ * Explicitly ends the NVTX range indicated by the handle `r` returned from a
2517
+ * prior call to `start_range_in<D>`. The range may end on a different thread
2518
+ * from where it began.
2519
+ *
2520
+ * @tparam D Type containing `name` member used to identify the `domain` to
2521
+ * which the range belongs. Else, `domain::global` to indicate that the global
2522
+ * NVTX domain should be used.
2523
+ * @param r Handle to a range started by a prior call to `start_range_in`.
2524
+ *
2525
+ * @warning The domain type specified as template parameter to this function
2526
+ * must be the same that was specified on the associated `start_range_in` call.
2527
+ */
2528
+ template <typename D = domain::global>
2529
+ inline void end_range_in(range_handle r) noexcept
2530
+ {
2531
+ # ifndef NVTX_DISABLE
2532
+ nvtxDomainRangeEnd(domain::get<D>(), r.get_value());
2533
+ # else
2534
+ (void) r;
2535
+ # endif
2536
+ }
2537
+
2538
+ /**
2539
+ * @brief Manually end the range associated with the handle `r` in the global
2540
+ * domain.
2541
+ *
2542
+ * Explicitly ends the NVTX range indicated by the handle `r` returned from a
2543
+ * prior call to `start_range`. The range may end on a different thread from
2544
+ * where it began.
2545
+ *
2546
+ * @param r Handle to a range started by a prior call to `start_range`.
2547
+ *
2548
+ * @warning The domain type specified as template parameter to this function
2549
+ * must be the same that was specified on the associated `start_range` call.
2550
+ */
2551
+ inline void end_range(range_handle r) noexcept
2552
+ {
2553
+ # ifndef NVTX_DISABLE
2554
+ end_range_in<domain::global>(r);
2555
+ # else
2556
+ (void) r;
2557
+ # endif
2558
+ }
2559
+
2560
+ /**
2561
+ * @brief A RAII object for creating a NVTX range within a domain that can
2562
+ * be created and destroyed on different threads.
2563
+ *
2564
+ * When constructed, begins a NVTX range in the specified domain. Upon
2565
+ * destruction, ends the NVTX range.
2566
+ *
2567
+ * Similar to `nvtx3::scoped_range_in`, with a few key differences:
2568
+ * - `unique_range` objects can be destroyed in an order whereas `scoped_range` objects must be
2569
+ * destroyed in exact reverse creation order
2570
+ * - `unique_range` can start and end on different threads
2571
+ * - `unique_range` is movable
2572
+ * - `unique_range` objects can be constructed as heap objects
2573
+ *
2574
+ * There is extra overhead associated with `unique_range` constructs and therefore use of
2575
+ * `nvtx3::scoped_range_in` should be preferred.
2576
+ *
2577
+ * @tparam D Type containing `name` member used to identify the `domain`
2578
+ * to which the `unique_range_in` belongs. Else, `domain::global` to
2579
+ * indicate that the global NVTX domain should be used.
2580
+ */
2581
+ template <typename D = domain::global>
2582
+ class NVTX3_MAYBE_UNUSED unique_range_in
2583
+ {
2584
+ public:
2585
+ /**
2586
+ * @brief Construct a new unique_range_in object with the specified event attributes
2587
+ *
2588
+ * Example:
2589
+ * \code{cpp}
2590
+ * nvtx3::event_attributes attr{"msg", nvtx3::rgb{127,255,0}};
2591
+ * nvtx3::unique_range_in<my_domain> range{attr}; // Creates a range with message contents
2592
+ * // "msg" and green color
2593
+ * \endcode
2594
+ *
2595
+ * @param[in] attr `event_attributes` that describes the desired attributes
2596
+ * of the range.
2597
+ */
2598
+ explicit unique_range_in(event_attributes const& attr) noexcept
2599
+ : handle_{start_range_in<D>(attr)}
2600
+ {}
2601
+
2602
+ /**
2603
+ * @brief Constructs a `unique_range_in` from the constructor arguments
2604
+ * of an `event_attributes`.
2605
+ *
2606
+ * Forwards the arguments `args...` to construct an
2607
+ * `event_attributes` object. The `event_attributes` object is then
2608
+ * associated with the `unique_range_in`.
2609
+ *
2610
+ * For more detail, see `event_attributes` documentation.
2611
+ *
2612
+ * Example:
2613
+ * \code{.cpp}
2614
+ * // Creates a range with message "message" and green color
2615
+ * nvtx3::unique_range_in<> r{"message", nvtx3::rgb{127,255,0}};
2616
+ * \endcode
2617
+ *
2618
+ * @param[in] args Variadic parameter pack of arguments to construct an `event_attributes`
2619
+ * associated with this range.
2620
+ */
2621
+ template <typename... Args>
2622
+ explicit unique_range_in(Args const&... args) noexcept
2623
+ : unique_range_in{event_attributes{args...}}
2624
+ {}
2625
+
2626
+ /**
2627
+ * @brief Default constructor creates a `unique_range_in` with no
2628
+ * message, color, payload, nor category.
2629
+ *
2630
+ */
2631
+ constexpr unique_range_in() noexcept
2632
+ : unique_range_in{event_attributes{}}
2633
+ {}
2634
+
2635
+ /**
2636
+ * @brief Destroy the `unique_range_in` ending the range.
2637
+ *
2638
+ */
2639
+ ~unique_range_in() noexcept = default;
2640
+
2641
+ /**
2642
+ * @brief Move constructor allows taking ownership of the NVTX range from
2643
+ * another `unique_range_in`.
2644
+ *
2645
+ * @param other The range to take ownership of
2646
+ */
2647
+ unique_range_in(unique_range_in&& other) noexcept = default;
2648
+
2649
+ /**
2650
+ * @brief Move assignment operator allows taking ownership of an NVTX range
2651
+ * from another `unique_range_in`.
2652
+ *
2653
+ * @param other The range to take ownership of
2654
+ */
2655
+ unique_range_in& operator=(unique_range_in&& other) noexcept = default;
2656
+
2657
+ /// Copy construction is not allowed to prevent multiple objects from owning
2658
+ /// the same range handle
2659
+ unique_range_in(unique_range_in const&) = delete;
2660
+
2661
+ /// Copy assignment is not allowed to prevent multiple objects from owning the
2662
+ /// same range handle
2663
+ unique_range_in& operator=(unique_range_in const&) = delete;
2664
+
2665
+ private:
2666
+ struct end_range_handle
2667
+ {
2668
+ using pointer = range_handle; /// Override the pointer type of the unique_ptr
2669
+ void operator()(range_handle h) const noexcept
2670
+ {
2671
+ end_range_in<D>(h);
2672
+ }
2673
+ };
2674
+
2675
+ /// Range handle used to correlate the start/end of the range
2676
+ std::unique_ptr<range_handle, end_range_handle> handle_;
2677
+ };
2678
+
2679
+ /**
2680
+ * @brief Alias for a `unique_range_in` in the global NVTX domain.
2681
+ *
2682
+ */
2683
+ using unique_range = unique_range_in<domain::global>;
2684
+
2685
+ /**
2686
+ * @brief Annotates an instantaneous point in time with a "marker", using the
2687
+ * attributes specified by `attr`.
2688
+ *
2689
+ * Unlike a "range" which has a beginning and an end, a marker is a single event
2690
+ * in an application, such as detecting a problem:
2691
+ *
2692
+ * \code{.cpp}
2693
+ * bool success = do_operation(...);
2694
+ * if (!success) {
2695
+ * nvtx3::event_attributes attr{"operation failed!", nvtx3::rgb{255,0,0}};
2696
+ * nvtx3::mark_in<my_domain>(attr);
2697
+ * }
2698
+ * \endcode
2699
+ *
2700
+ * Note that nvtx3::mark_in<D> is a function, not a class like scoped_range_in<D>.
2701
+ *
2702
+ * @tparam D Type containing `name` member used to identify the `domain`
2703
+ * to which the `unique_range_in` belongs. Else, `domain::global` to
2704
+ * indicate that the global NVTX domain should be used.
2705
+ * @param[in] attr `event_attributes` that describes the desired attributes
2706
+ * of the mark.
2707
+ */
2708
+ template <typename D = domain::global>
2709
+ inline void mark_in(event_attributes const& attr) noexcept
2710
+ {
2711
+ # ifndef NVTX_DISABLE
2712
+ nvtxDomainMarkEx(domain::get<D>(), attr.get());
2713
+ # else
2714
+ (void) (attr);
2715
+ # endif
2716
+ }
2717
+
2718
+ /**
2719
+ * @brief Annotates an instantaneous point in time with a "marker", using the
2720
+ * arguments to construct an `event_attributes`.
2721
+ *
2722
+ * Unlike a "range" which has a beginning and an end, a marker is a single event
2723
+ * in an application, such as detecting a problem:
2724
+ *
2725
+ * \code{.cpp}
2726
+ * bool success = do_operation(...);
2727
+ * if (!success) {
2728
+ * nvtx3::mark_in<my_domain>("operation failed!", nvtx3::rgb{255,0,0});
2729
+ * }
2730
+ * \endcode
2731
+ *
2732
+ * Note that nvtx3::mark_in<D> is a function, not a class like scoped_range_in<D>.
2733
+ *
2734
+ * Forwards the arguments `args...` to construct an `event_attributes` object.
2735
+ * The attributes are then associated with the marker. For more detail, see
2736
+ * the `event_attributes` documentation.
2737
+ *
2738
+ * @tparam D Type containing `name` member used to identify the `domain`
2739
+ * to which the `unique_range_in` belongs. Else `domain::global` to
2740
+ * indicate that the global NVTX domain should be used.
2741
+ * @param[in] args Variadic parameter pack of arguments to construct an `event_attributes`
2742
+ * associated with this range.
2743
+ *
2744
+ */
2745
+ template <typename D = domain::global, typename... Args>
2746
+ inline void mark_in(Args const&... args) noexcept
2747
+ {
2748
+ # ifndef NVTX_DISABLE
2749
+ mark_in<D>(event_attributes{args...});
2750
+ # endif
2751
+ }
2752
+
2753
+ /**
2754
+ * @brief Annotates an instantaneous point in time with a "marker", using the
2755
+ * attributes specified by `attr`, in the global domain.
2756
+ *
2757
+ * Unlike a "range" which has a beginning and an end, a marker is a single event
2758
+ * in an application, such as detecting a problem:
2759
+ *
2760
+ * \code{.cpp}
2761
+ * bool success = do_operation(...);
2762
+ * if (!success) {
2763
+ * nvtx3::event_attributes attr{"operation failed!", nvtx3::rgb{255,0,0}};
2764
+ * nvtx3::mark(attr);
2765
+ * }
2766
+ * \endcode
2767
+ *
2768
+ * Note that nvtx3::mark is a function, not a class like scoped_range.
2769
+ *
2770
+ * @param[in] attr `event_attributes` that describes the desired attributes
2771
+ * of the mark.
2772
+ */
2773
+ inline void mark(event_attributes const& attr) noexcept
2774
+ {
2775
+ # ifndef NVTX_DISABLE
2776
+ mark_in<domain::global>(attr);
2777
+ # endif
2778
+ }
2779
+
2780
+ /**
2781
+ * @brief Annotates an instantaneous point in time with a "marker", using the
2782
+ * arguments to construct an `event_attributes`, in the global domain.
2783
+ *
2784
+ * Unlike a "range" which has a beginning and an end, a marker is a single event
2785
+ * in an application, such as detecting a problem:
2786
+ *
2787
+ * \code{.cpp}
2788
+ * bool success = do_operation(...);
2789
+ * if (!success) {
2790
+ * nvtx3::mark("operation failed!", nvtx3::rgb{255,0,0});
2791
+ * }
2792
+ * \endcode
2793
+ *
2794
+ * Note that nvtx3::mark is a function, not a class like scoped_range.
2795
+ *
2796
+ * Forwards the arguments `args...` to construct an `event_attributes` object.
2797
+ * The attributes are then associated with the marker. For more detail, see
2798
+ * the `event_attributes` documentation.
2799
+ *
2800
+ * @param[in] args Variadic parameter pack of arguments to construct an
2801
+ * `event_attributes` associated with this range.
2802
+ *
2803
+ */
2804
+ template <typename... Args>
2805
+ inline void mark(Args const&... args) noexcept
2806
+ {
2807
+ # ifndef NVTX_DISABLE
2808
+ mark_in<domain::global>(args...);
2809
+ # endif
2810
+ }
2811
+
2812
+ } // namespace NVTX3_VERSION_NAMESPACE
2813
+
2814
+ } // namespace nvtx3
2815
+
2816
+ # ifndef NVTX_DISABLE
2817
+ /**
2818
+ * @brief Convenience macro for generating a range in the specified `domain`
2819
+ * from the lifetime of a function
2820
+ *
2821
+ * This macro is useful for generating an NVTX range in `domain` from
2822
+ * the entry point of a function to its exit. It is intended to be the first
2823
+ * line of the function.
2824
+ *
2825
+ * Constructs a static `registered_string_in` using the name of the immediately
2826
+ * enclosing function returned by `__func__` and constructs a
2827
+ * `nvtx3::scoped_range` using the registered function name as the range's
2828
+ * message.
2829
+ *
2830
+ * Example:
2831
+ * \code{.cpp}
2832
+ * struct my_domain{static constexpr char const* name{"my_domain"};};
2833
+ *
2834
+ * void foo(...) {
2835
+ * NVTX3_FUNC_RANGE_IN(my_domain); // Range begins on entry to foo()
2836
+ * // do stuff
2837
+ * ...
2838
+ * } // Range ends on return from foo()
2839
+ * \endcode
2840
+ *
2841
+ * @param[in] D Type containing `name` member used to identify the
2842
+ * `domain` to which the `registered_string_in` belongs. Else,
2843
+ * `domain::global` to indicate that the global NVTX domain should be used.
2844
+ */
2845
+ # define NVTX3_V1_FUNC_RANGE_IN(D) \
2846
+ static ::nvtx3::v1::registered_string_in<D> const nvtx3_func_name__{__func__}; \
2847
+ static ::nvtx3::v1::event_attributes const nvtx3_func_attr__{nvtx3_func_name__}; \
2848
+ ::nvtx3::v1::scoped_range_in<D> const nvtx3_range__{nvtx3_func_attr__};
2849
+
2850
+ /**
2851
+ * @brief Convenience macro for generating a range in the specified `domain`
2852
+ * from the lifetime of a function if the given boolean expression evaluates
2853
+ * to true.
2854
+ *
2855
+ * Similar to `NVTX3_V1_FUNC_RANGE_IN(D)`, the only difference being that
2856
+ * `NVTX3_V1_FUNC_RANGE_IF_IN(D, C)` only generates a range if the given boolean
2857
+ * expression evaluates to true.
2858
+ *
2859
+ * @param[in] D Type containing `name` member used to identify the
2860
+ * `domain` to which the `registered_string_in` belongs. Else,
2861
+ * `domain::global` to indicate that the global NVTX domain should be used.
2862
+ *
2863
+ * @param[in] C Boolean expression used to determine if a range should be
2864
+ * generated.
2865
+ */
2866
+ # define NVTX3_V1_FUNC_RANGE_IF_IN(D, C) \
2867
+ ::nvtx3::v1::detail::optional_scoped_range_in<D> optional_nvtx3_range__; \
2868
+ if (C) \
2869
+ { \
2870
+ static ::nvtx3::v1::registered_string_in<D> const nvtx3_func_name__{__func__}; \
2871
+ static ::nvtx3::v1::event_attributes const nvtx3_func_attr__{nvtx3_func_name__}; \
2872
+ optional_nvtx3_range__.begin(nvtx3_func_attr__); \
2873
+ }
2874
+ # else
2875
+ # define NVTX3_V1_FUNC_RANGE_IN(D)
2876
+ # define NVTX3_V1_FUNC_RANGE_IF_IN(D, C)
2877
+ # endif // NVTX_DISABLE
2878
+
2879
+ /**
2880
+ * @brief Convenience macro for generating a range in the global domain from the
2881
+ * lifetime of a function.
2882
+ *
2883
+ * This macro is useful for generating an NVTX range in the global domain from
2884
+ * the entry point of a function to its exit. It is intended to be the first
2885
+ * line of the function.
2886
+ *
2887
+ * Constructs a static `registered_string_in` using the name of the immediately
2888
+ * enclosing function returned by `__func__` and constructs a
2889
+ * `nvtx3::scoped_range` using the registered function name as the range's
2890
+ * message.
2891
+ *
2892
+ * Example:
2893
+ * \code{.cpp}
2894
+ * void foo(...) {
2895
+ * NVTX3_FUNC_RANGE(); // Range begins on entry to foo()
2896
+ * // do stuff
2897
+ * ...
2898
+ * } // Range ends on return from foo()
2899
+ * \endcode
2900
+ */
2901
+ # define NVTX3_V1_FUNC_RANGE() NVTX3_V1_FUNC_RANGE_IN(::nvtx3::v1::domain::global)
2902
+
2903
+ /**
2904
+ * @brief Convenience macro for generating a range in the global domain from the
2905
+ * lifetime of a function if the given boolean expression evaluates to true.
2906
+ *
2907
+ * Similar to `NVTX3_V1_FUNC_RANGE()`, the only difference being that
2908
+ * `NVTX3_V1_FUNC_RANGE_IF(C)` only generates a range if the given boolean
2909
+ * expression evaluates to true.
2910
+ *
2911
+ * @param[in] C Boolean expression used to determine if a range should be
2912
+ * generated.
2913
+ */
2914
+ # define NVTX3_V1_FUNC_RANGE_IF(C) NVTX3_V1_FUNC_RANGE_IF_IN(::nvtx3::v1::domain::global, C)
2915
+
2916
+ /* When inlining this version, versioned macros must have unversioned aliases.
2917
+ * For each NVTX3_Vx_ #define, make an NVTX3_ alias of it here.*/
2918
+ # if defined(NVTX3_INLINE_THIS_VERSION)
2919
+ /* clang format off */
2920
+ # define NVTX3_FUNC_RANGE NVTX3_V1_FUNC_RANGE
2921
+ # define NVTX3_FUNC_RANGE_IF NVTX3_V1_FUNC_RANGE_IF
2922
+ # define NVTX3_FUNC_RANGE_IN NVTX3_V1_FUNC_RANGE_IN
2923
+ # define NVTX3_FUNC_RANGE_IF_IN NVTX3_V1_FUNC_RANGE_IF_IN
2924
+ /* clang format on */
2925
+ # endif
2926
+
2927
+ #endif // NVTX3_CPP_DEFINITIONS_V1_0
2928
+
2929
+ /* Add functionality for new minor versions here, by copying the above section enclosed
2930
+ * in #ifndef NVTX3_CPP_DEFINITIONS_Vx_y, and incrementing the minor version. This code
2931
+ * is an example of how additions for version 1.2 would look, indented for clarity. Note
2932
+ * that the versioned symbols and macros are always provided, and the unversioned symbols
2933
+ * are only provided if NVTX3_INLINE_THIS_VERSION was defined at the top of this header.
2934
+ *
2935
+ * \code{.cpp}
2936
+ * #ifndef NVTX3_CPP_DEFINITIONS_V1_2
2937
+ * #define NVTX3_CPP_DEFINITIONS_V1_2
2938
+ * namespace nvtx3 {
2939
+ * NVTX3_INLINE_IF_REQUESTED namespace NVTX3_VERSION_NAMESPACE {
2940
+ * class new_class {};
2941
+ * inline void new_function() {}
2942
+ * }
2943
+ * }
2944
+ *
2945
+ * // Macros must have the major version in their names:
2946
+ * #define NVTX3_V1_NEW_MACRO_A() ...
2947
+ * #define NVTX3_V1_NEW_MACRO_B() ...
2948
+ *
2949
+ * // If inlining, make aliases for the macros with the version number omitted
2950
+ * #if defined(NVTX3_INLINE_THIS_VERSION)
2951
+ * #define NVTX3_NEW_MACRO_A NVTX3_V1_NEW_MACRO_A
2952
+ * #define NVTX3_NEW_MACRO_B NVTX3_V1_NEW_MACRO_B
2953
+ * #endif
2954
+ * #endif // NVTX3_CPP_DEFINITIONS_V1_2
2955
+ * \endcode
2956
+ */
2957
+
2958
+ /* Undefine all temporarily-defined unversioned macros, which would conflict with
2959
+ * subsequent includes of different versions of this header. */
2960
+ #undef NVTX3_CPP_VERSION_MAJOR
2961
+ #undef NVTX3_CPP_VERSION_MINOR
2962
+ #undef NVTX3_CONCAT
2963
+ #undef NVTX3_NAMESPACE_FOR
2964
+ #undef NVTX3_VERSION_NAMESPACE
2965
+ #undef NVTX3_INLINE_IF_REQUESTED
2966
+ #undef NVTX3_CONSTEXPR_IF_CPP14
2967
+ #undef NVTX3_MAYBE_UNUSED
2968
+ #undef NVTX3_NO_DISCARD
2969
+
2970
+ #if defined(NVTX3_INLINE_THIS_VERSION)
2971
+ # undef NVTX3_INLINE_THIS_VERSION
2972
+ #endif
2973
+
2974
+ #if defined(NVTX3_USE_CHECKED_OVERLOADS_FOR_GET_DEFINED_HERE)
2975
+ # undef NVTX3_USE_CHECKED_OVERLOADS_FOR_GET_DEFINED_HERE
2976
+ # undef NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
2977
+ #endif
2978
+
2979
+ #if defined(NVTX3_STATIC_ASSERT_DEFINED_HERE)
2980
+ # undef NVTX3_STATIC_ASSERT_DEFINED_HERE
2981
+ # undef NVTX3_STATIC_ASSERT
2982
+ #endif