cuda-cccl 0.3.4__cp311-cp311-manylinux_2_24_aarch64.whl

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

Potentially problematic release.


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

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